:root {
    --primary-red: #ff3e3e;
    --primary-red-glow: rgba(255, 62, 62, 0.4);
    --dark-bg: #0f1115;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
    --text-muted: #a0a0a0;
}

/* Bootstrap Overrides for Dark Theme */
.text-muted {
    color: var(--text-muted) !important;
}

.text-white {
    color: #ffffff !important;
}

.text-dark,
.text-black {
    color: #e0e0e0 !important;
}

.form-label,
.form-check-label {
    color: #ffffff !important;
}

.small {
    color: inherit;
}


body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--dark-bg);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: none;
    /* Removing physical border to fix ghost lines */
    box-shadow: inset 0 0 0 1px var(--glass-border),
        0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 20px;
}

.glass-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2),
        0 15px 45px 0 rgba(0, 0, 0, 0.4);
    z-index: 5;
    position: relative;
}

/* Typography & Links */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: #ff6060;
}

/* Custom Nav */
.modern-nav {
    padding: 1.25rem 0;
    margin-bottom: 2rem;
}

.nav-link-custom {
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link-custom i {
    width: 18px;
    height: 18px;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    background: var(--glass-bg);
    color: var(--primary-red);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #ff3e3e 0%, #ff6060 100%);
    border: none;
    border-radius: 14px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 15px var(--primary-red-glow);
    transition: 0.3s;
}

.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px var(--primary-red-glow);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: #fff;
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Forms */
.form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    padding: 0.75rem 1rem;
}


.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.25rem var(--primary-red-glow);
    color: #fff;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Fix for native select dropdowns visibility */
select.form-control option {
    background-color: #1a1d21;
    color: #ffffff;
}

/* Ensure textarea also has white text */
textarea.form-control {
    color: #fff;
}

/* Checkbox List Styling */
.form-check-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    margin-top: 0.5rem;
}

.form-check-input-group .form-check {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding-left: 1.2rem;
    /* Override default bootstrap padding */
}

.form-check-input-group .form-check:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 62, 62, 0.3);
    transform: translateY(-2px);
}

.form-check-input-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    margin-top: 0;
    margin-left: 0;
}

.form-check-input-group input[type="checkbox"]:checked {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    box-shadow: 0 0 10px var(--primary-red-glow);
}

.form-check-input-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff !important;
}

/* Form Spacing Improvement */
form .mb-3 {
    margin-bottom: 1.5rem !important;
}

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(255, 62, 62, 0.08), transparent 40%),
        radial-gradient(circle at bottom left, rgba(62, 100, 255, 0.05), transparent 40%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

/* Status Badges */
.badge-custom {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.badge-completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Animation Utils */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Charts Containers */
.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Footer Styles */
footer {
    background: rgba(13, 17, 23, 0.4);
    backdrop-filter: blur(10px);
    margin-top: auto;
}

.footer-logo-link img {
    transition: all 0.3s ease;
}

.footer-logo-link:hover img {
    filter: brightness(1.1);
    transform: scale(0.98);
}

/* Dashboard Redesign - Mobile App Style */
.dash-action-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    height: 100%;
}

.dash-action-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.dash-action-card .icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-pill .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 0.25rem;
}

.stat-pill .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.recent-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid transparent;
    transition: background 0.2s;
}

.recent-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.recent-item.pending {
    border-left-color: #ffc107;
}

.recent-item.completed {
    border-left-color: #28a745;
}

.recent-item.upcoming {
    border-left-color: #007bff;
}

/* Grid layout for actions */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.hover-red:hover {
    color: var(--primary-red) !important;
}

.transition-02 {
    transition: 0.2s;
}

/* Diary / Notebook Style */
.diary-container {
    background-color: #f8f5e1;
    background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 100% 2rem;
    background-position-y: 1.5rem;
    /* Align lines with text baseline */
    padding: 4rem 4rem 4rem 5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 100px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    min-height: 80vh;
    color: #2c3e50;
    font-family: 'Outfit', sans-serif;
    line-height: 2rem;
    border-left: 15px solid #2c3e50;
}

.diary-container::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3.5rem;
    width: 2px;
    background: rgba(255, 62, 62, 0.3);
}

.diary-rings {
    position: absolute;
    left: -20px;
    top: 50px;
    bottom: 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    z-index: 10;
}

.diary-ring {
    width: 40px;
    height: 12px;
    background: linear-gradient(to bottom, #dcdde1, #7f8c8d);
    border-radius: 10px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.diary-entry {
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 2rem;
}

.diary-date {
    font-weight: 700;
    color: #e74c3c;
    border-bottom: 1px dashed #e74c3c;
    display: inline-block;
    margin-bottom: 0px;
    height: 2rem;
    line-height: 2rem;
}

.diary-content {
    font-size: 1.1rem;
    color: #34495e;
    margin: 0;
    padding: 0;
}

.diary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #95a5a6;
    margin-bottom: 0;
    height: 2rem;
    line-height: 2.5rem;
    /* Optical adjustment to look like it's above the line */
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
        font-size: 10pt !important;
        /* Smaller text to save paper */
    }

    .navbar,
    footer,
    .btn,
    .no-print,
    .filters-container {
        display: none !important;
    }

    .diary-container {
        box-shadow: none !important;
        border: none !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: auto !important;
        line-height: normal !important;
        /* Remove diary line-height */
    }

    .diary-container::after,
    .diary-rings {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .diary-entry {
        margin-bottom: 1rem !important;
        /* Tighter entries */
        page-break-inside: avoid;
        border-bottom: 1px solid #eee !important;
        padding-bottom: 0.5rem !important;
    }

    .diary-date {
        height: auto !important;
        line-height: normal !important;
        font-size: 11pt !important;
    }

    .diary-label {
        height: auto !important;
        line-height: normal !important;
        font-size: 8pt !important;
    }

    .diary-content {
        font-size: 10pt !important;
        min-height: 0 !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}