:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.5);
    --accent: #ec4899;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-bg: radial-gradient(circle at top right, #1e1b4b, #0f172a);

    /* Spacing */
    --container-padding: 1.5rem;
    --header-height: 60px;
    --nav-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ─── Global: Prevent icon/text overlap in ALL icon-inside-input patterns ───
   Targets the common pattern: .relative > i.absolute + input with pl-*
   Works on login, signup, forgot-password, reset-password, bot-builder,
   manage-bots, files, admin pages, checkout — everywhere across the site.  */
.relative > i.absolute,
.relative > i[class*="absolute"],
[class*="relative"] > i[style*="absolute"] {
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Force all inputs with left-padding icons to respect box-sizing on mobile */
input[class*="pl-9"],
input[class*="pl-10"],
input[class*="pl-11"],
input[class*="pl-12"] {
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
}



body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    background-image: var(--gradient-bg);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
}

/* Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.btn {
    background: var(--gradient-main);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn:active {
    transform: scale(0.98);
}

.container {
    padding: var(--container-padding);
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: calc(var(--nav-height) + 20px);
    /* Space for bottom nav */
}

/* Loading Screen */
.loading-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-loader {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

/* --- Landing Page Styles --- */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px var(--container-padding);
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 100;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-sm {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--container-padding);
    padding-top: 100px;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-visual {
    margin-top: 50px;
    width: 100%;
    max-width: 400px;
}

.floating-card {
    padding: 20px;
    text-align: left;
    animation: float 6s ease-in-out infinite;
}

.code-line {
    font-family: monospace;
    color: #a5b4fc;
    margin-bottom: 5px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-bottom: 100px;
}

.feature-card {
    padding: 25px;
    text-align: center;
}

.icon-glow {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

/* --- Dashboard Styles --- */
.dashboard {
    padding: var(--container-padding);
    padding-bottom: 100px;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.badge {
    background: var(--primary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bot-card {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    gap: 15px;
}

.bot-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bot-info {
    flex: 1;
}

.bot-info h4 {
    margin-bottom: 5px;
}

.status.online {
    color: #4ade80;
    font-size: 0.8rem;
}

.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px var(--primary-glow);
    cursor: pointer;
    z-index: 90;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    display: flex;
    justify-content: space-around;
    padding: 15px;
    z-index: 100;
}

.bottom-nav a {
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-visual {
    margin-top: 50px;
    width: 100%;
    max-width: 400px;
}

.floating-card {
    padding: 20px;
    text-align: left;
    animation: float 6s ease-in-out infinite;
}

.code-line {
    font-family: monospace;
    color: #a5b4fc;
    margin-bottom: 5px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-bottom: 100px;
}

.feature-card {
    padding: 25px;
    text-align: center;
}

.icon-glow {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

/* --- Dashboard Styles --- */
.dashboard {
    padding: var(--container-padding);
    padding-bottom: 100px;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.badge {
    background: var(--primary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bot-card {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    gap: 15px;
}

.bot-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bot-info {
    flex: 1;
}

.bot-info h4 {
    margin-bottom: 5px;
}

.status.online {
    color: #4ade80;
    font-size: 0.8rem;
}

.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px var(--primary-glow);
    cursor: pointer;
    z-index: 90;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    display: flex;
    justify-content: space-around;
    padding: 15px;
    z-index: 100;
}

.bottom-nav a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.bottom-nav a.active {
    color: var(--primary);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- Auth Styles --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    margin-bottom: 10px;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-muted);
}

.input-group {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s;
    overflow: hidden;
}

.input-group:focus-within {
    border-color: var(--primary);
}

.input-group > i:first-child {
    flex-shrink: 0;
    padding: 0 4px 0 16px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
    line-height: 1;
}

.input-group input {
    flex: 1;
    min-width: 0;
    padding: 14px 40px 14px 10px;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.input-group input:focus {
    border-color: transparent;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}


.stat-card .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bot-card {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    gap: 15px;
}

.bot-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bot-info {
    flex: 1;
}

.bot-info h4 {
    margin-bottom: 5px;
}

.status.online {
    color: #4ade80;
    font-size: 0.8rem;
}

.fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-main);
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px var(--primary-glow);
    cursor: pointer;
    z-index: 90;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    display: flex;
    justify-content: space-around;
    padding: 15px;
    z-index: 100;
}

.bottom-nav a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.2s;
}

.bottom-nav a.active {
    color: var(--primary);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- Auth Styles --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 10;
}

.auth-header {
    text-align: center;
    margin-bottom: 10px;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-muted);
}

.input-group {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s;
    overflow: hidden;
}

.input-group:focus-within {
    border-color: var(--primary);
}

.input-group > i:first-child {
    flex-shrink: 0;
    padding: 0 4px 0 16px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
    line-height: 1;
}

.input-group input {
    flex: 1;
    min-width: 0;
    padding: 14px 40px 14px 10px;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.input-group input:focus {
    border-color: transparent;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

/* --- Wizard Styles --- */
.wizard-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
}

.wizard-card {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    position: relative;
    z-index: 10;
}

.wizard-header {
    text-align: center;
    margin-bottom: 30px;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
}

.step.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

.line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.wizard-step h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.lang-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.lang-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.upload-box {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.upload-box i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.divider {
    text-align: center;
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-github {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.input-group label {
    display: block;
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

/* --- Wizard Styles --- */
.wizard-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--container-padding);
    position: relative;
}

.wizard-card {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    position: relative;
    z-index: 10;
}

.wizard-header {
    text-align: center;
    margin-bottom: 30px;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
}

.step.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 10px var(--primary-glow);
}

.line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.wizard-step h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.lang-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.lang-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.upload-box {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.upload-box i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.divider {
    text-align: center;
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-github {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.deploy-loader {
    font-size: 4rem;
    color: var(--primary);
    margin: 40px 0;
}

/* --- Console Styles --- */
.console-container {
    min-height: 100vh;
    padding: var(--container-padding);
    padding-bottom: 100px;
}

.console-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.bot-identity {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.console-actions {
    display: flex;
    gap: 10px;
}

.btn-icon-sm {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.btn-icon-sm.stop {
    color: #ef4444;
}

.console-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--gradient-main);
}

.history-list {
    list-style: none;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.success {
    color: #4ade80;
}

.time {
    color: var(--text-muted);
}

.terminal {
    background: #0f172a;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    height: 400px;
    overflow-y: auto;
}

.term-line {
    margin-bottom: 5px;
}

.ts {
    color: var(--text-muted);
    margin-right: 10px;
}

.info {
    color: #60a5fa;
}

.warn {
    color: #fbbf24;
}

.log {
    color: #a3a3a3;
}


.divider {
    text-align: center;
    margin: 15px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-github {
    width: 100%;
    background: #333;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.deploy-loader {
    font-size: 4rem;
    color: var(--primary);
    margin: 40px 0;
}

/* --- Console Styles --- */
.console-container {
    min-height: 100vh;
    padding: var(--container-padding);
    padding-bottom: 100px;
}

.console-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
}

.bot-identity {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.console-actions {
    display: flex;
    gap: 10px;
}

.btn-icon-sm {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}

.btn-icon-sm.stop {
    color: #ef4444;
}

.console-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.tab.active {
    background: var(--primary);
    color: white;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: var(--gradient-main);
}

.history-list {
    list-style: none;
}

.history-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.success {
    color: #4ade80;
}

.time {
    color: var(--text-muted);
}

.terminal {
    background: #0f172a;
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    height: 400px;
    overflow-y: auto;
}

.term-line {
    margin-bottom: 5px;
}

.ts {
    color: var(--text-muted);
    margin-right: 10px;
}

.info {
    color: #60a5fa;
}

.warn {
    color: #fbbf24;
}

.log {
    color: #a3a3a3;
}

.term-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* --- Settings Styles --- */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

.settings-card {
    padding: 20px;
}

.settings-card h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-avatar {
    position: relative;
    width: 80px;
    height: 80px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.btn-edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.profile-info h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.form-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.billing-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plan-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.plan-price {
    color: var(--primary);
    font-weight: 600;
}

.usage-bar {
    margin-bottom: 15px;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.billing-actions {
    border-radius: 50%;
    border: 3px solid var(--primary);
}

.btn-edit-avatar {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--primary);
    border: none;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.profile-info h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.profile-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.form-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.billing-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.plan-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.plan-price {
    color: var(--primary);
    font-weight: 600;
}

.usage-bar {
    margin-bottom: 15px;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.billing-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

.preference-item:last-child {
    border-bottom: none;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Pricing Page --- */
.pricing-container {
    padding: 40px 20px;
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    padding: 30px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.badge-popular {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.features-list {
    list-style: none;
    margin-bottom: 25px;
}

.features-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.features-list li i {
    color: #4ade80;
}

/* --- Documentation Page --- */
.docs-container {
    display: flex;
    max-width: 1000px;
    margin: 40px auto;
    min-height: 600px;
}

.docs-sidebar {
    width: 250px;
    border-right: 1px solid var(--border);
    padding: 20px;
}

.docs-sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar li {
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 5px;
    color: var(--text-main);
    transition: background 0.2s;
}

.docs-sidebar li:hover,
.docs-sidebar li.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.docs-content {
    flex: 1;
    padding: 30px;
}

.docs-content h1 {
    margin-bottom: 20px;
}

.docs-content h3 {
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--primary);
}

.docs-content p {
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.alert-box {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid var(--primary);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.alert-box i {
    color: var(--primary);
    font-size: 1.2rem;
}

/* --- Footer Styles --- */
.main-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 60px 20px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col p {
    color: var(--text-muted);
    line-height: 1.5;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
}

/* --- File Manager Styles --- */
.file-manager-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: calc(100vh - 200px);
}

.file-tree {
    width: 280px;
    padding: 20px;
    flex-shrink: 0;
}

.file-tree h3 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.file-tree-content {
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

.file-list {
    list-style: none;
}

.file-item,
.folder-item {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.file-item i,
.folder-item i {
    font-size: 1rem;
    width: 20px;
}

.folder-item {
    font-weight: 600;
    color: var(--primary);
    cursor: default;
}

.folder-item span {
    color: var(--text-main);
}

.editor-container {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
}

.current-file-name {
    font-weight: 600;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--primary);
}

.editor-content {
    flex: 1;
    overflow: hidden;
}

.editor-textarea {
    width: 100%;
    height: 100%;
    min-height: 500px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    color: var(--text-main);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 20px;
    resize: none;
    outline: none;
    tab-size: 4;
}

.editor-textarea:focus {
    background: rgba(0, 0, 0, 0.3);
}

.editor-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    color: var(--text-muted);
    text-align: center;
}

.editor-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.editor-empty-state h3 {
    margin-bottom: 10px;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* ========================================
   MOBILE BOTTOM NAVIGATION (Premium Design)
   ======================================== */

.mobile-bottom-nav {
    display: none;
    /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0 4px;
    z-index: 99999 !important;
    pointer-events: auto !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-bottom-nav a,
.mobile-bottom-nav .nav-item {
    pointer-events: auto !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

/* Show only on mobile */
@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        /* Horizontal flex layout */
        justify-content: space-around;
        align-items: center;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Add padding to body so content doesn't hide behind nav */
    body {
        padding-bottom: 58px;
    }
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 4px 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    flex: 1;
    max-width: 70px;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item:active {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-bottom-nav .nav-item .icon-glow {
    font-size: 1.15rem;
    margin-bottom: 0;
    line-height: 1;
}

.mobile-bottom-nav .nav-item span {
    font-size: 0.625rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.1;
}

/* Featured item (Create button) - Gradient effect */
.mobile-bottom-nav .nav-item-featured {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: white !important;
    transform: scale(1.02);
    border-radius: 10px;
}

.mobile-bottom-nav .nav-item-featured .icon-glow.gradient {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.25rem;
}

.mobile-bottom-nav .nav-item-featured .gradient-text {
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Active state indicator */
.mobile-bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 0 0 4px 4px;
}

/* --- Custom Modal Styles --- */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.custom-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.custom-modal.show .modal-content {
    transform: translateY(0);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.modal-icon.warning {
    color: #f59e0b;
}

.modal-icon.error {
    color: #ef4444;
}

.modal-icon.success {
    color: #10b981;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-main);
}

.modal-message {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s;
}

.modal-btn:active {
    transform: scale(0.95);
}

.modal-btn.primary {
    background: var(--gradient-main);
    color: white;
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.modal-btn.danger {
    background: #ef4444;
    color: white;
}

/* ==========================================================================
   BOTIFY LUXURY ALERT & TOAST SYSTEM (GLOBAL)
   ========================================================================== */

#botify-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 32px);
}

@media (max-width: 640px) {
    #botify-toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

.botify-toast {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 0, 0, 0.3);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    cursor: pointer;
}

.botify-toast:hover {
    transform: translateY(-2px) scale(1.01);
}

/* SweetAlert2 Luxury Dark Glassmorphism Theme Overrides */
.swal2-popup {
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(99, 102, 241, 0.15) !important;
    color: #f8fafc !important;
    font-family: inherit !important;
    padding: 24px !important;
}

.swal2-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    margin-bottom: 8px !important;
}

.swal2-html-container {
    color: #cbd5e1 !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
}

.swal2-actions {
    gap: 10px !important;
    margin-top: 20px !important;
}

.swal2-styled.swal2-confirm {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 0.825rem !important;
    padding: 10px 22px !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.2s ease !important;
}

.swal2-styled.swal2-confirm:hover {
    transform: translateY(-1px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
}

.swal2-styled.swal2-cancel {
    background: rgba(255, 255, 255, 0.07) !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    padding: 10px 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    transition: all 0.2s ease !important;
}

.swal2-styled.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.swal2-styled.swal2-deny {
    background: #ef4444 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 0.825rem !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.swal2-icon {
    transform: scale(0.85);
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.swal2-timer-progress-bar {
    background: linear-gradient(90deg, #10b981, #6366f1) !important;
    height: 3px !important;
}



/* ==========================================================================
   HIGH-DENSITY COMPACT MOBILE UI SYSTEM (PHONE SCREEN OPTIMIZATION)
   ========================================================================== */
@media (max-width: 768px) {
    /* 1. Global Viewport & Base Density */
    html {
        font-size: 14.5px;
    }

    body {
        padding-bottom: 58px !important;
        font-size: 0.85rem;
    }

    /* Main container and layouts */
    .desktop-main main,
    main {
        padding: 8px 10px !important;
    }

    .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* 2. Compact Topbar / Header */
    .desktop-main header {
        padding: 4px 8px !important;
    }
    .desktop-main header h2 {
        font-size: 0.95rem !important;
    }
    .desktop-main header .p-2 {
        padding: 6px !important;
    }

    /* 3. Glass Cards & Panels - Tighter paddings & rounded corners */
    .glass,
    .bg-card,
    .card {
        border-radius: 14px !important;
    }

    /* Override large tailwind paddings on mobile */
    .glass.p-8,
    .glass.p-6,
    .p-8,
    .p-6 {
        padding: 12px 14px !important;
    }

    .glass.p-5,
    .p-5 {
        padding: 10px 12px !important;
    }

    .glass.p-4,
    .p-4 {
        padding: 8px 10px !important;
    }

    /* Reduce aggressive bottom margins */
    .mb-12,
    .mb-8 {
        margin-bottom: 12px !important;
    }
    .mb-6 {
        margin-bottom: 10px !important;
    }
    .mb-4 {
        margin-bottom: 8px !important;
    }

    /* 4. Headings & Typography */
    h1, .text-3xl, .text-4xl, .text-5xl {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    h2, .text-2xl {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
    }
    h3, .text-xl {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }
    p, .text-base {
        font-size: 0.8rem !important;
        line-height: 1.45 !important;
    }
    .text-sm {
        font-size: 0.725rem !important;
    }
    .text-xs {
        font-size: 0.65rem !important;
    }

    /* 5. Stats Grid - 2 columns compact */
    .stats-grid,
    .grid-cols-1.md\:grid-cols-4,
    .grid-cols-1.md\:grid-cols-3 {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }

    .stat-card {
        padding: 10px 12px !important;
        border-radius: 12px !important;
    }
    .stat-card .value,
    .stat-card .text-2xl,
    .stat-card .text-3xl {
        font-size: 1.25rem !important;
    }
    .stat-card .label {
        font-size: 0.7rem !important;
    }
    .stat-card .icon-glow {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.9rem !important;
        margin-bottom: 4px !important;
    }

    /* 6. Bot Cards & List Items */
    .bot-card {
        padding: 8px 10px !important;
        gap: 8px !important;
        margin-bottom: 8px !important;
        border-radius: 12px !important;
    }
    .bot-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
    }

    /* 7. Buttons & Form Inputs */
    .btn,
    .btn-primary,
    .modal-btn,
    button:not(.mobile-bottom-nav button) {
        font-size: 0.75rem !important;
    }
    .btn,
    .btn-primary {
        padding: 6px 12px !important;
        border-radius: 8px !important;
    }
    .btn-sm {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }

    input, select, textarea {
        font-size: 0.8125rem !important;
        padding: 6px 10px !important;
        border-radius: 8px !important;
    }



    /* 9. Badges & Tags */
    .badge, .rounded-full.px-3 {
        padding: 2px 6px !important;
        font-size: 0.65rem !important;
    }

    /* 10. Tables & Code Viewers */
    table th, table td {
        padding: 6px 8px !important;
        font-size: 0.75rem !important;
    }
}

/* ==========================================================================
   LOW-END DEVICE PERFORMANCE & LEGACY BROWSER HARDWARE ACCELERATION
   ========================================================================== */

/* Fast Tap Response - Remove 300ms Click Delay */
a, button, input, select, textarea, .nav-item, .bot-card, .btn {
    touch-action: manipulation;
}

/* Hardware Layer Compositing (GPU Acceleration without Battery Drain) */
.botify-toast,
.desktop-main header {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Fallback for older browsers without backdrop-filter support (Old Android / iOS) */
@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
    .glass,
    .bg-card,
    .mobile-bottom-nav,
    .botify-toast,
    .swal2-popup,
    .desktop-main header {
        background: #0f172a !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
    }
}