body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #a3e4db, #fef3c7, #bfdbfe);
    min-height: 100vh;
    margin: 0;
    color: #1f2937;
    transition: background 0.5s, color 0.3s;
}

.dark-theme {
    background: linear-gradient(135deg, #1e293b, #9333ea, #312e81);
    color: #f9fafb;
}

/* Main container for content alignment */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

@media (max-width: 768px) {
    .main-container { padding: 1rem; }
}

/* --------------- Logo --------------- */
.custom-logo {
    width: 60px !important;
    min-width: 36px !important;
    max-width: 60px !important;
    height: auto;
    display: block !important;
    margin: 0 1rem 0 0 !important;
}
@media (max-width: 700px) {
    .custom-logo {
        width: 36vw !important;
        min-width: 0 !important;
        max-width: 70px !important;
    }
}

/* --------------- Header & Nav --------------- */
header {
    border-radius: 1.1rem;
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

.nav-tabs {
    display: flex; gap: 0.6rem; flex-wrap: wrap;
}
@media (max-width: 700px) {
    .nav-tabs {
        flex-direction: column;
        gap: 0.35rem;
    }
}
.nav-tab {
    background: rgba(255,255,255,0.92);
    border: 1px solid #e5e7eb;
    border-radius: 0.45rem;
    padding: 0.7rem 1.4rem;
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}
.nav-tab:hover, .nav-tab.active {
    background: #e0e7ef;
    transform: translateY(-1.5px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    font-weight: 700;
}
.dark-theme .nav-tab { background: #23263a; color: #f3f4f6; border: 1px solid #312e81;}
.dark-theme .nav-tab:hover, .dark-theme .nav-tab.active { background: #312e81; color: #fff; }

/* --------------- Profile/Theme Toggle --------------- */
#userProfileSection { font-size: 1rem; display: flex; align-items: center; }
#theme-toggle-root { margin-left: 1rem; }

/* --------------- Card Styles --------------- */
.card, .bg-white\/90 {
    background: rgba(255,255,255,0.94);
    border-radius: 1.25rem;
    box-shadow: 0 1px 8px 0 rgba(17,28,56,0.08);
    padding: 1.7rem 1.2rem;
    margin-bottom: 1.5rem;
    min-height: 7.5rem;
    transition: box-shadow 0.3s, transform 0.2s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.14);
}
.dark-theme .card, .dark-theme .bg-white\/90 {
    background: #23263a;
    color: #f3f4f6;
    border-color: #1e293b;
}

/* --------------- Pro Tip Banner --------------- */
.pro-tip {
    background: linear-gradient(90deg, #e0f7fa 60%, #fef3c7 100%);
    color: #047857;
    font-size: 1rem;
    margin-bottom: 0.9rem;
    border-left: 4px solid #14b8a6;
    border-radius: 0.4rem;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
}
.pro-tip::before {
    content: "💡 ";
    font-size: 1.2em;
    vertical-align: middle;
    margin-right: 0.4em;
}

/* --------------- Login Section --------------- */
#loginSection {
    text-align: center;
    padding: 2rem;
    max-width: 380px;
    margin: 2rem auto 0 auto;
    background: rgba(255,255,255,0.95);
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
#loginSection label {
    text-align: left;
    display: block;
    margin-bottom: 0.5rem;
}
#loginSection input {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    width: 100%;
    max-width: 15rem;
    margin: 0 auto;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#loginSection input:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.18);
}
#loginBtn {
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ef4444;
    color: #fff;
    margin-top: 0.5rem;
    font-weight: 600;
    transition: background-color 0.2s;
}
#loginBtn:hover {
    background: #dc2626;
}

/* --------------- Utility Classes --------------- */
.flex              { display: flex; }
.flex-col          { flex-direction: column; }
.items-center      { align-items: center; }
.justify-center    { justify-content: center; }
.relative          { position: relative; }
.absolute-top-right{ position: absolute; top: 1rem; right: 1rem; }
.w-full            { width: 100%; }
.max-w-xs          { max-width: 20rem; }
.max-w-md          { max-width: 28rem; }
.rounded-lg        { border-radius: 0.5rem; }
.rounded-xl        { border-radius: 0.75rem; }
.rounded-2xl       { border-radius: 1rem; }
.shadow-md         { box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.shadow-xl         { box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.shadow-2xl        { box-shadow: 0 15px 35px rgba(0,0,0,0.15); }
.mb-5              { margin-bottom: 1.25rem; }
.mb-6              { margin-bottom: 1.5rem; }
.mb-8              { margin-bottom: 2rem; }
.mt-6              { margin-top: 1.5rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.grid              { display: grid; }
.grid-cols-1       { grid-template-columns: repeat(1, minmax(0,1fr)); }
.md\:grid-cols-2   { grid-template-columns: repeat(2, minmax(0,1fr)); }
.lg\:grid-cols-3   { grid-template-columns: repeat(3, minmax(0,1fr)); }
.gap-6             { gap: 1.5rem; }
.gap-8             { gap: 2rem; }
.p-3               { padding: 0.75rem; }
.p-4               { padding: 1rem; }
.p-6               { padding: 1.5rem; }
.py-3              { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4              { padding-top: 1rem; padding-bottom: 1rem; }
.px-3              { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4              { padding-left: 1rem; padding-right: 1rem; }
.z-10              { z-index: 10; }
.z-20              { z-index: 20; }
.overflow-y-auto   { overflow-y: auto; }
.hidden            { display: none; }
.transition-all    { transition: all 0.3s ease; }
.transition        { transition: all 0.2s; }

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --------------- Dark Theme Extras --------------- */
.dark-theme input,
.dark-theme select,
.dark-theme textarea {
    background: #1e2536;
    color: #e5e7eb;
    border: 1px solid #374151;
}
.dark-theme #loginSection {
    background: rgba(30,41,59,0.97);
}

/* Enhanced Dark Theme Support */
.dark-theme .text-gray-900 {
    color: #f1f5f9;
}
.dark-theme .text-gray-600 {
    color: #94a3b8;
}
.dark-theme .text-gray-500 {
    color: #6b7280;
}
.dark-theme .text-gray-400 {
    color: #9ca3af;
}
.dark-theme .border-gray-200 {
    border-color: #374151;
}
.dark-theme .border-gray-300 {
    border-color: #4b5563;
}
.dark-theme .bg-gray-50 {
    background-color: #374151;
}
.dark-theme .bg-gray-100 {
    background-color: #4b5563;
}
.dark-theme .bg-white {
    background-color: #1e293b;
}
.dark-theme .shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
}
.dark-theme .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
.dark-theme .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Dark theme for tables */
.dark-theme table {
    background-color: #1e293b;
}
.dark-theme thead {
    background-color: #374151;
}
.dark-theme th,
.dark-theme td {
    border-color: #4b5563;
}
.dark-theme tbody tr:hover {
    background-color: #374151;
}

/* Dark theme for navigation */
.dark-theme nav {
    background-color: #1e293b;
    border-bottom: 1px solid #374151;
}
.dark-theme .nav-link {
    color: #f1f5f9;
}
.dark-theme .nav-link:hover {
    background-color: #374151;
    color: #3b82f6;
}

/* Dark theme for buttons */
.dark-theme button {
    background-color: #374151;
    border-color: #4b5563;
    color: #f1f5f9;
}
.dark-theme button:hover {
    background-color: #4b5563;
}