@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap');

:root {
    --text-primary: #1F2937;        /* Strong contrast for readability,             Charcoal */
    --text-secondary: #6B7280;      /* Subtle, clean for less emphasis,             Slate Gray */
    --text-tertiary: #ffffff;       /* White for contrast,                          White */
    --bg-color: #F9FAFB;            /* Very light gray, softer than pure white,     Off-White */
    --accent: #10B981;              /* Positive color for value changes,            Emerald Green */
    --negative: #EF4444;            /* Highlights losses or drops,                  Rose Red */
    --pending: #F59E0B;             /* Highlights pending status,                   Amber */
    --link: #fa8231;                /* For clickable elements,                      Indigo Blue */ 
    --border-color: #E5E7EB;        /* Subtle dividers and card outlines,           Cool Gray */
}

[data-theme="dark"] {
    --text-primary: #F3F4F6;        /* Clean and readable against dark BG,          Light Gray */
    --text-secondary: #9CA3AF;      /* Softer tone for secondary elements,          Cool Gray */
    --text-tertiary: #ffffff;       /* White for contrast,                          White */
    --bg-color: #111827;            /* Deep but not pure black, easier on eyes,     Charcoal Black */
    --accent: #10B981;              /* Same as light mode for consistency,          Emerald Green */
    --negative: #EF4444;            /* Stays bold and visible,                      Rose Red */
    --pending: #F59E0B;             /* Highlights pending status,                   Amber */
    --link: #fd9644;                /* Brighter for better contrast,                Soft Indigo */ 
    --border-color: #1F2937;        /* Subtle outlines without overwhelming,        Dark Slate */

    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: var(--bg-color);
    font-family: 'Nunito', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Content Section*/
.content {
    flex: 1;
    margin-left: 280px;
    height: 100vh;
    overflow-y: auto;
    transition: margin-left 0.2s;
    padding: 1.5rem 3rem;
    background-color: var(--bg-color);
}

.content h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 600;
}

.sidebar.collapsed ~ .content {
    margin-left: 80px;
}

/* Auth Section*/

.auth-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
}

.auth-content .background-icon {
    position: absolute;
    color: var(--text-primary);
    opacity: 0.1;
    font-size: 2rem;
    pointer-events: none;
    z-index: 0;
}

.auth-content .wrapper {
    position: relative;
    z-index: 1;
    width: 320px;
    min-height: 100px;
    background-color: var(--bg-color);
    border-radius: 5px;
    box-shadow: 0px 0px 20px 5px var(--border-color);
    -webkit-box-shadow: 0px 0px 30px 5px var(--border-color);
    -moz-box-shadow: 0px 0px 30px 5px var(--border-color);
    padding: 30px;
}

.auth-content .header .auth-title {
    color: var(--text-primary);
    margin-left: 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-content .header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 30px;
}

.auth-content .input-field {
    width: 100%;
    height: 45px;
    border: none;
    padding: 10px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    outline: none;
    font-size: 15px;
    margin-bottom: 20px;
    transition: .5s;
    border-radius: 5px;
}

.auth-content .register-link {
    margin-bottom: 10px;
}

.auth-content .register-link a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: .5s;
    font-weight: 500;
}

.auth-content .register-link a:hover{
    color: var(--text-primary);
}

.auth-content .input-group button{
    width: 100%;
    height: 45px;
    border: none;
    color: var(--text-primary);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 17px;
    font-weight: 500;
    transition: 0.3s;
    cursor: pointer;
}

.auth-content .input-group button:hover{
    background-color: var(--border-color);
    color: var(--text-primary);
}

/* Sidebar Section*/
.sidebar {
    height: 100vh;
    width: 280px;
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
}

.sidebar-header {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    position: relative;
    transition: none;
}

.logo-container {
    width: 25px;
    height: 25px;
    position: relative;
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .logo-dark {
    display: none;
}

[data-theme="light"] .logo-light {
    display: none;
}

.sidebar-header h2 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.theme-toggle:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.theme-toggle i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--negative);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: var(--border-color);
}

.logout-btn i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    transform: scaleX(-1);
}

.collapse-btn {
    position: absolute;
    top: 3.8rem;
    right: -12px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.collapse-btn:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.collapse-btn i {
    font-size: 0.75rem;
}

.sidebar.collapsed .collapse-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .collapse-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .theme-toggle span,
.sidebar.collapsed .logout-btn span {
    display: none;
}

.sidebar.collapsed .nav-link,
.sidebar.collapsed .theme-toggle,
.sidebar.collapsed .logout-btn,
.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .nav-link i,
.sidebar.collapsed .theme-toggle i,
.sidebar.collapsed .logout-btn i {
    margin: 0;
}

/* Mobile Navbar */
.mobile-navbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
}

.mobile-navbar .logo-container {
    width: 25px;
    height: 25px;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn:hover {
    color: var(--text-primary);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-color);
    z-index: 1001;
    padding: 1rem;
    flex-direction: column;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 16px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

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

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.mobile-nav-link:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.mobile-nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.mobile-menu-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.mobile-menu-footer .theme-toggle,
.mobile-menu-footer .logout-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    font-size: 1.2rem;
    width: 100%;
    text-align: left;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-menu-footer .theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-footer .theme-toggle:hover,
.mobile-menu-footer .logout-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.mobile-menu-footer .theme-toggle i,
.mobile-menu-footer .logout-btn i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

.mobile-menu-footer .logout-btn {
    color: var(--negative);
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-navbar {
        display: flex;
    }

    .content {
        margin-left: 0;
        margin-top: 60px;
        padding: 1rem;
    }

    .sidebar.collapsed ~ .content {
        margin-left: 0;
    }

    .mobile-menu .theme-toggle,
    .mobile-menu .logout-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.2rem;
    }
}

/* Notification Section*/
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--accent);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: notification-in 0.3s ease-out;
    max-width: 300px;
    word-wrap: break-word;
}

.notification.error {
    background: var(--negative);
}

@keyframes notification-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notification-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}