* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #475569;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    
    --border-color: #334155;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: -0.2px;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(51, 65, 85, 0.5);
    overflow-y: auto;
    z-index: 999;
    padding: 1.5rem 0;
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

.sidebar.mobile-open {
    transform: translateX(0);
}

.sidebar-close-btn {
    position: absolute;
    right: 1rem;
    top: 1.2rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.sidebar-close-btn:hover {
    color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.sidebar-logo-text {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.3rem;
}

.sidebar-nav {
    list-style: none;
}

.sidebar-nav-item {
    padding: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sidebar-nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary);
    padding-left: calc(1.5rem - 3px);
}

.sidebar-nav-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--primary);
    padding-left: calc(1.5rem - 3px);
}

.sidebar-nav-label {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-top: 1rem;
}

/* SIDEBAR BOTTOM / USER PROFILE */
.sidebar-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.8));
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0; /* Important for ellipsis */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-user-info h3 {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.sidebar-user-info p {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin: 2px 0 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 0.65rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

/* MAIN CONTENT */
.main-container {
    margin-left: 240px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: calc(100% - 240px);
}

@media (max-width: 768px) {
    .main-container {
        margin-left: 0;
        width: 100%;
    }
}

.navbar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0; /* Allow shrinking */
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }
}

.navbar-title {
    min-width: 0;
}

.navbar-title h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-title p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MODERN DIALOGS (IOS STYLE) */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dialog-box {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 320px;
    padding: 1.5rem;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.dialog-overlay.active .dialog-box {
    transform: scale(1);
}

.dialog-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.dialog-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 -1.5rem -1.5rem -1.5rem;
}

.dialog-btn {
    background: none;
    border: none;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.dialog-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dialog-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.dialog-btn-danger {
    color: #ef4444;
}

.dialog-btn-cancel {
    color: var(--text-tertiary);
    font-weight: 400;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* PREMIUM UI ENHANCEMENTS */
.glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.2);
}

/* MICRO INTERACTIONS */
.btn-primary, .btn-small, .sidebar-nav-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:active { transform: scale(0.96); }
.btn-small:active { transform: scale(0.94); }

/* SIDEBAR REFINEMENT */
.sidebar-nav-link {
    border-radius: 12px;
    margin: 0.25rem 0.75rem;
    padding: 0.75rem 1rem;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.25rem;
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    color: var(--primary);
    border-left: none;
}

.sidebar-logo {
    border-bottom: none;
    padding: 1.5rem;
}

.sidebar-logo-icon {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* FORMS UPGRADE */
input, textarea, select {
    border-radius: 12px !important;
    background: rgba(15, 23, 42, 0.4) !important;
}

input:focus, textarea:focus, select:focus {
    background: rgba(15, 23, 42, 0.6) !important;
}

/* Page Transition */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

main {
    animation: fadeIn 0.4s ease-out forwards;
}

/* TOAST NOTIFICATION */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: var(--text-primary);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 450px;
    animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%) scale(0.9); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.hiding {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(100%) scale(0.9); }
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }
.toast-warning { border-left: 4px solid var(--warning); }

/* LOADING OVERLAY */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--bg-tertiary);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.navbar-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.lang-toggle {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text-primary);
}

/* MAIN CONTENT AREA */
main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* HERO */
.hero {
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* FEATURES GRID */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.feature-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* PRICING */
.pricing-section {
    margin-top: 4rem;
    text-align: center;
}

.pricing-section h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pricing-section > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.price-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.price-card:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
}

.price-card.featured {
    border-color: var(--primary);
    transform: scale(1.02);
    background: rgba(99, 102, 241, 0.1);
}

.price-card.featured::before {
    content: "POPULAR";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.price-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0 0.5rem;
}

.price-card .period {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.price-card ul {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.price-card li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.price-card li:last-child {
    border-bottom: none;
}

.price-card li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

/* BUTTONS */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.btn-small {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.btn-link {
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 600;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 1rem;
    margin-bottom: 0.75rem;
}

.btn-danger-outline {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Glassmorphism card upgrade */
.db-card, .dashboard-card, .tool-card, .profile-section {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.db-card:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

/* FORMS */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-group label {
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(30, 41, 59, 0.6);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* AUTH */
.auth-container {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2rem;
}

.auth-box {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.auth-box h1 {
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 2rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}


/* DASHBOARD */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 0.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.dashboard-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
}

.dashboard-card h3 {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0.5rem 0;
}

.progress-bar {
    background: var(--bg-tertiary);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.75rem;
}

.progress {
    background: linear-gradient(90deg, var(--success), #34d399);
    height: 100%;
    transition: width 0.3s ease;
}

.api-key {
    font-family: 'Menlo', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 4px;
    margin: 0.5rem 0;
    color: var(--text-primary);
    letter-spacing: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* QUICK ACTIONS */
.quick-actions {
    margin: 3rem 0;
}

.quick-actions h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.btn-action {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 60px;
}

.btn-action:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* CARDS */
.db-card,
.tool-card,
.profile-section {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.db-card:hover,
.tool-card:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.8);
}

/* DATABASES */
.databases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.db-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.db-type {
    color: white;
    background: var(--primary);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.db-desc {
    color: var(--text-secondary);
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

.db-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* MODAL */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-tertiary);
    background: none;
    border: none;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--text-primary);
}

/* TOOLS */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tool-card {
    padding: 2rem;
}

.tool-card h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.endpoint {
    border-left: 3px solid var(--primary);
    padding-left: 1rem;
    margin: 1rem 0;
}

.endpoint h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.endpoint p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.endpoint code {
    background: var(--bg-tertiary);
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.5rem;
    color: var(--text-primary);
    font-family: 'Menlo', monospace;
}

.code-block {
    background: #0f172a;
    color: #94a3b8;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Menlo', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid rgba(51, 65, 85, 0.5);
    margin: 1rem 0;
    position: relative;
}

.code-block::before {
    content: "cURL";
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    opacity: 0.5;
}

.endpoint-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.endpoint-card:hover {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.6);
}

.method-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 0.5rem;
}

.method-get { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.method-post { background: rgba(99, 102, 241, 0.1); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.3); }
.method-put { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.method-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.copy-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-tertiary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
}

.code-block:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

/* PROFILE */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.profile-section h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.info-group {
    margin-bottom: 1.5rem;
}

.info-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-group p {
    font-size: 1rem;
    color: var(--text-primary);
}

.plan-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.api-key-display {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.masked {
    font-family: 'Menlo', monospace;
    background: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: 6px;
    flex: 1;
    font-size: 0.8rem;
}

.danger-zone {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.danger-zone h2 {
    color: #ef4444;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

/* FOOTER */
.footer {
    background: rgba(30, 41, 59, 0.6);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
}

.footer p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 2rem;
    background: rgba(30, 41, 59, 0.6);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

/* CTA SECTION */
.cta-section {
    margin-top: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-section h2 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 800;
}

.cta-section p {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* API GUIDE */
.api-guide {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.api-guide h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* PAGE HEADER */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--text-primary);
}

/* MOBILE RESPONSIVE */
@media (max-width: 1024px) {
    .main-container {
        margin-left: 280px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .price-card.featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: 100%;
        transform: translateX(-100%);
        left: 0;
    }

    .main-container {
        margin-left: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar-left {
        gap: 0.75rem;
    }

    .navbar-title h1 {
        font-size: 1.2rem;
    }

    .navbar-title p {
        font-size: 0.8rem;
    }

    main {
        padding: 1.25rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dashboard-card {
        padding: 1.25rem;
    }

    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .btn-action {
        padding: 1rem 0.75rem;
        min-height: 50px;
        font-size: 0.85rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .databases-grid {
        grid-template-columns: 1fr;
    }

    .db-card {
        padding: 1.25rem;
    }

    .code-block {
        font-size: 0.75rem;
        padding: 0.75rem;
    }

    .cta-section {
        padding: 2rem 1rem;
    }

    .cta-section h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0.5rem;
    }

    .hamburger-btn {
        font-size: 1.25rem;
        padding: 0.375rem;
    }

    .navbar-title h1 {
        font-size: 1rem;
    }

    .navbar-title p {
        display: none;
    }

    .lang-toggle {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    main {
        padding: 1rem;
    }

    .dashboard-card,
    .feature-card,
    .db-card,
    .tool-card,
    .profile-section {
        padding: 1rem;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.25rem;
    }

    .auth-box {
        padding: 1.5rem;
    }

    .hero-content h1 {
        font-size: 1.25rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .pricing-section h2 {
        font-size: 1.3rem;
    }

    .price {
        font-size: 1.75rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .btn-action {
        padding: 0.875rem;
        min-height: 45px;
        font-size: 0.8rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .quick-actions h2 {
        font-size: 1.1rem;
    }

    .api-guide h2,
    .profile-section h2,
    .danger-zone h2 {
        font-size: 1.1rem;
    }

    .code-block {
        font-size: 0.7rem;
        padding: 0.75rem;
    }
}
