:root {
    --primary: #190e4f;
    --secondary: #f5effe;
    --accent: #925d6a;
    --accent-dark: #651e3e;
    --text: #451e3d;
    --background: #f5effe;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
}

.btn-cta {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.btn-cta.btn-action {
    padding: .375rem .75rem;
    border-radius: 5px;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

/* Estilos para botão de login */
.navbar .btn-cta.btn-action {
    padding: 0.5rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid var(--accent);
}

.navbar .btn-cta.btn-action:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.navbar .btn-cta.btn-action i {
    font-size: 1rem;
}

.navbar {
    background-color: var(--primary) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-family: 'Merriweather', serif;
    color: var(--secondary) !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand img {
    height: 38px;
    width: auto;
}

.nav-link {
    color: var(--secondary) !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--accent) !important;
}

.container {
    max-width: 1200px;
    padding: 2rem;
}

/* Estilo para cards */
.card {
    border: none;
    border-left: 4px solid var(--accent);
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-text .item {
    margin-bottom: 0.25rem;
}

/* Elementos de progresso estilizados como marcadores de livro */
.progress {
    height: 1rem;
    background-color: var(--secondary);
    border-radius: 0;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.progress-white {
    background-color: rgba(255, 255, 255, 0.6);
}

.progress-bar {
    background-color: var(--accent);
    transition: width 0.6s ease;
}

/* Estilo especial para livros concluídos */
.progress-bar.completed {
    background: linear-gradient(90deg, var(--accent) 0%, #28a745 100%);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

/* Números de progresso em fonte monoespaçada */
.progress-number {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary);
}

/* Gradientes para placeholders de capas de livros */
.book-cover-placeholder {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    aspect-ratio: 2/3;
    max-height: 120px;
    width: 80px;
    margin: 1rem auto;
    border-radius: 4px;
}

/* Efeito de textura de papel */
.paper-texture {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
}

/* Estilização para inputs como entradas de diário */
.journal-input {
    border: 1px solid var(--accent);
    border-radius: 0;
    padding: 1rem;
    font-family: 'Inter', sans-serif;
    background-color: white;
    transition: border-color 0.3s ease;
}

.journal-input:focus {
    border-color: var(--primary);
    box-shadow: none;
    outline: none;
}

/* Badges estilizados como ex-libris */
.achievement-badge {
    background-color: var(--secondary);
    color: var(--primary);
    border: 2px solid var(--accent);
    padding: 0.5rem 1rem;
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
}

/* Animações de transição de página */
.page-transition {
    animation: pageTurn 0.5s ease-in-out;
}

@keyframes pageTurn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estados de foco aprimorados */
*:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Enhanced mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .custom-alert {
        margin: 0.5rem;
    }

    .card {
        margin-bottom: 0.75rem;
    }

    .card-text hr {
        margin: 0.5rem 0;
    }

    .card-text .item {
        margin-bottom: 0;
    }

    .progress {
        height: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .btn {
        padding: 0.25rem 1rem;
        font-size: 0.9rem;
    }

    h1.h2 {
        font-size: 1.5rem;
    }

    .card-title.h6 {
        font-size: 1rem;
    }

    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .progress-number {
        font-size: 0.9rem;
    }

    .text-muted {
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.75rem;
    }

    .btn-book-primary {
        width: 100%;
        margin-bottom: 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem !important;
    }

    .card-body {
        padding: 0.75rem;
    }
    
    h6.text-uppercase {
        margin-bottom: 0.5rem !important;
        font-size: 0.85rem;
    }
    
    /* Compact form layouts */
    .single-line-form {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .single-line-form .input-group {
        flex: 1;
    }
    
    .single-line-form .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .text-muted.mb-4 {
        margin-bottom: 0.75rem !important;
        font-size: 0.8rem;
    }
    
    /* More horizontal padding reduction */
    .container, .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col, .col-sm, .col-md, .col-lg, .col-xl, 
    [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Mobile responsive styles for new card design */
    .card-header-link {
        padding: 0.375rem;
        margin: -0.375rem -0.375rem 0.375rem -0.375rem;
    }
    
    .card-actions {
        padding-top: 0.5rem;
    }
    
    .btn-icon-edit,
    .btn-archive-subtle {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Extra small screens */
@media (max-width: 375px) {
    .container {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .card-body {
        padding: 0.6rem;
    }

    h1.h2 {
        font-size: 1.25rem;
    }

    .single-line-form {
        gap: 0.2rem;
    }
    
    .single-line-form .btn {
        padding: 0.375rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .single-line-form .form-control {
        font-size: 0.85rem;
    }
    
    .input-group-text {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Extra small screens - enhanced card design */
    .card-header-link {
        padding: 0.25rem;
        margin: -0.25rem -0.25rem 0.25rem -0.25rem;
    }
    
    .btn-icon-edit,
    .btn-archive-subtle {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* Estilo para botões primários */
.btn-book-primary {
    background-color: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-book-primary:hover {
    background-color: var(--accent-dark);
    color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Estilos para o dropdown do usuário */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--secondary);
    text-decoration: none;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-email {
    font-size: 0.75rem;
    opacity: 0.8;
}

.dropdown-menu {
    background-color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    margin-top: 0.5rem;
}

.dropdown-item {
    color: var(--text);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--secondary);
    color: var(--primary);
}

.plan-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-premium {
    background-color: var(--accent-dark);
    color: var(--secondary);
}

.badge-basic {
    background-color: var(--accent);
    color: var(--secondary);
}

/* Ajuste no hover do dropdown e links */
.user-dropdown:hover,
.user-dropdown:focus {
    color: var(--secondary);
    text-decoration: none;
}

/* Remove a cor azul padrão do Bootstrap no hover/focus */
.dropdown-toggle:hover,
.dropdown-toggle:focus {
    color: var(--secondary) !important;
}

/* Ajuste para links em geral */
a {
    color: var(--accent-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* Ajuste específico para botões de ação como "Ver Progresso" */
.btn-primary, .btn-success, .btn-info {
    border: none;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.btn-primary {
    color: var(--secondary);
    background-color: var(--accent);
}

.btn-success {
    color: var(--secondary);
    background-color: var(--accent-dark);
}

.btn-info {
    color: var(--secondary);
    background-color: var(--primary);
}


.btn-primary:hover,
.btn-primary:focus {
    color: var(--secondary);
    background-color: var(--accent);
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-success:hover,
.btn-success:focus {
    color: var(--secondary);
    background-color: var(--accent-dark);
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-info:hover,
.btn-info:focus {
    color: var(--secondary);
    background-color: var(--primary);
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Remover outline azul padrão do Bootstrap */
.btn:focus,
.nav-link:focus,
.dropdown-toggle:focus {
    box-shadow: none !important;
}

.book-completed-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.book-completed-banner::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.2;
    z-index: 0;
}

.book-completed-banner .content {
    position: relative;
    z-index: 1;
}

.book-completed-banner h3 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.reading-stats {
    background-color: var(--secondary);
    border-radius: 8px;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
}

.reading-stats-item {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reading-stats-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.reading-stats-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.reading-stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Roboto Mono', monospace;
}

.reading-stats-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.8;
    animation: confetti-fall 3s linear infinite;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(60vh) rotate(360deg);
        opacity: 0;
    }
}

/* Footer styling with sticky footer solution */
html, body {
    height: 100%;
}

.container.mt-4 {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0 1.5rem;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer h5 {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.footer p {
    opacity: 0.85;
    line-height: 1.5;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease;
    opacity: 0.85;
}

.footer a:hover {
    opacity: 1;
    text-decoration: none;
}

.footer hr {
    margin: 1.5rem 0;
    opacity: 0.1;
    border-color: white;
}

@media (max-width: 768px) {
    .footer {
        text-align: center;
        padding: 1.5rem 0 1rem;
    }
    
    .footer [class*="col-"] {
        margin-bottom: 1.5rem;
    }
    
    .footer .text-md-end {
        text-align: center !important;
    }
}

/* Daily Reading Dashboard Styles */
.daily-reading-dashboard {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    color: white;
    border-radius: 16px;
    border-top-left-radius: 0;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.daily-reading-dashboard::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.1'/%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 0;
}

.daily-reading-dashboard .content {
    position: relative;
    z-index: 1;
}

.daily-reading-dashboard h2 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.daily-reading-dashboard h2 i {
    font-size: 1.5rem;
    color: var(--secondary);
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-family: 'Roboto Mono', monospace;
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Reading Todo List Styles */
.reading-todo-list {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--accent);
}

.reading-todo-list h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reading-todo-list h3 i {
    color: var(--accent);
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: var(--secondary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg,  rgba(125, 98, 255, 0.15) 0%, #fff 100%);
    border-color: var(--accent);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    background: #e8f5e8;
    border-color: #28a745;
    border-left-width: 4px;
    border-left-radius: 4px;
    opacity: 0.8;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #6c757d;
}

.todo-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--accent);
    border-radius: 6px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.todo-checkbox:hover {
    background: var(--accent);
    color: white;
}

.todo-checkbox.checked {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.todo-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.todo-book-title {
    font-weight: 600;
    color: var(--primary);
}

.todo-book-author {
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.8;
    display: inline-block;
}

.todo-pages {
    font-size: 0.9rem;
    color: var(--accent-dark);
    font-weight: 500;
    white-space: nowrap;
}

.todo-time {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}

/* Progress Modal Styles */
.progress-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.progress-modal .modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

.progress-modal .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-modal .btn-close {
    filter: invert(1);
}

.progress-modal .modal-body {
    padding: 2rem;
}

.progress-modal .form-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.progress-modal .form-control {
    border: 2px solid var(--secondary);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.progress-modal .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(146, 93, 106, 0.25);
}

.progress-modal .modal-footer {
    border: none;
    padding: 1.5rem 2rem;
    gap: 1rem;
}

.progress-modal .btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Animation for completed items */
@keyframes completeAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .daily-reading-dashboard {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .daily-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.25rem;
    }
    
    .todo-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .todo-checkbox {
        width: 20px;
        height: 20px;
        margin-right: 0.75rem;
    }
    
    .reading-todo-list {
        padding: 1rem;
    }
    
    .progress-modal .modal-body {
        padding: 1.5rem;
    }
    
    .progress-modal .modal-footer {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .daily-stats {
        grid-template-columns: 1fr;
    }
    
    .todo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .todo-checkbox {
        align-self: flex-start;
    }
    
    .todo-pages,
    .todo-time {
        align-self: flex-end;
    }
}

/* Progress bar thin variant */
.progress-thin {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.progress-thinner {
    height: 6px;
}

/* Mini progress indicators for daily progress */
.todo-progress-today {
    margin-top: 0.5rem;
}

.progress-mini {
    height: 4px;
    background-color: rgba(146, 93, 106, 0.2);
    border-radius: 2px;
    margin-bottom: 0.25rem;
    overflow: hidden;
}

.progress-bar-mini {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #28a745 100%);
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* Enhanced todo item styling */
.todo-item {
    cursor: pointer;
    position: relative;
}

.todo-item:hover::before {
    opacity: 1;
}

/* Partial progress styling */
.todo-item.partial-progress {
    background: linear-gradient(135deg, #e8f5e8 0%, var(--secondary) 100%);
    border-color: #ffcf4c;
    border-width: 0;
    border-left-width: 4px;
    border-left-radius: 4px;
}

/* Overdue todo item styling */
.todo-item.overdue-todo {
    background: linear-gradient(135deg, #fff5f5 0%, var(--secondary) 100%);
    border-left-width: 4px;
    cursor: default;
    border-color: #dc3545;
    border-width: 0;
    border-left-width: 4px;
    border-left-radius: 4px;
}

.todo-item.overdue-todo .todo-checkbox {
    border-color: #dc3545;
    background: #fff5f5;
    color: #dc3545;
}

.todo-item.overdue-todo:hover {
    background: linear-gradient(135deg, #f8d7da 0%, rgba(255, 255, 255, 0.9) 100%);
    border-color: #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.todo-overdue-alert {
    margin-top: 0.5rem;
    margin-right: 1rem;
    padding: 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

.todo-overdue-alert .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Enhanced stat cards with progress indication */
.stat-card.progress-stat {
    position: relative;
    overflow: hidden;
}

.stat-card.progress-stat::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745 0%, var(--accent) 100%);
    transition: width 0.6s ease;
}

/* Time remaining indicators */
.todo-time .text-success {
    font-weight: 600;
}

.todo-time {
    font-size: 0.8rem;
    text-align: right;
}

/* Overdue book styles */
.card.overdue {
    border-left: 4px solid #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

.card.overdue:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.25);
}

.overdue-badge {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.overdue-badge i {
    font-size: 0.8rem;
}

.overdue-alert {
    background: linear-gradient(135deg, #f8d7da 0%, #ffffff 100%);
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    color: #721c24;
}

.overdue-alert h6 {
    color: #dc3545;
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.overdue-alert h6 i {
    color: #dc3545;
}

.overdue-alert p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.btn-extend-deadline {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-extend-deadline:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-archive:hover {
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.overdue-section {
    margin-bottom: 2rem;
}

.overdue-section h3 {
    color: #dc3545;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.overdue-section h3 i {
    font-size: 1.25rem;
}

/* Deadline extension modal styles */
.deadline-modal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(220, 53, 69, 0.3);
}

.deadline-modal .modal-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 1.5rem;
}

.deadline-modal .modal-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.deadline-modal .btn-close {
    filter: invert(1);
}

.deadline-modal .modal-body {
    padding: 2rem;
}

.deadline-modal .form-label {
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 0.75rem;
}

.deadline-modal .form-control {
    border: 2px solid #f8d7da;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.deadline-modal .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.deadline-modal .modal-footer {
    border: none;
    padding: 1.5rem 2rem;
    gap: 1rem;
}

.deadline-modal .btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Pages count styling */
.todo-pages {
    font-weight: 600;
    color: var(--accent-dark);
    font-family: 'Roboto Mono', monospace;
}

.todo-item.completed .todo-pages {
    color: #28a745;
}

.todo-item.partial-progress .todo-pages {
    color: #155724;
}

.nav-tabs.main-panel-tabs {
    border-bottom: none;
}

.nav-tabs.main-panel-tabs .nav-link {
    color: var(--accent-dark) !important;
    background-color: rgba(101, 30, 62, 0.1);
    border-color: var(--accent-dark);
    margin-right: 0.25rem;
}

.nav-tabs.main-panel-tabs .nav-link:hover {
    color: var(--accent) !important;
}

.nav-tabs.main-panel-tabs .nav-link.active {
    background-color: var(--primary);
    color: white !important;
}

.nav-tabs.main-panel-tabs .nav-link.active:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}


/* Responsive improvements for mobile */
@media (max-width: 768px) {
    .todo-progress-today {
        margin-top: 0.25rem;
    }
    
    .todo-progress-today small {
        font-size: 0.75rem;
    }
    
    .progress-mini {
        height: 3px;
    }
    
    .todo-item::before {
        width: 3px;
    }

    .nav-tabs.main-panel-tabs h5 {
        font-size: 1rem;
    }

    .daily-reading-dashboard .stat-card i {
        float: left;
    }
}

.deadline-modal .btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.todo-item.completed:hover {
    background: #e8f5e8;
    border-color: #28a745;
    cursor: default;
}

.todo-item.partial-progress:hover {
    background: linear-gradient(135deg, #d4edda 0%, rgba(255, 255, 255, 0.9) 100%);
}

/* Responsive adjustments for overdue books */
@media (max-width: 768px) {
    .overdue-alert {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .overdue-alert h6 {
        font-size: 0.9rem;
    }
    
    .overdue-alert p {
        font-size: 0.85rem;
    }

    .btn-extend-deadline, .btn-archive {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        width: 100%;
        margin: 1rem 0 0 !important;
    }

    .form-archive {
        width: 100%;
    }
    
    .overdue-section h3 {
        font-size: 1.25rem;
    }
    
    .overdue-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
    }
    
    .deadline-modal .modal-body {
        padding: 1.5rem;
    }
    
    .deadline-modal .modal-footer {
        padding: 1rem 1.5rem;
    }
}

/* Chart explanation section styles */
.chart-explanation {
    border: none;
    border-left: 4px solid var(--accent);
    background: linear-gradient(135deg, oklch(0.8 0.11 281.2 / .3) 0%, oklch(0.9 0.11 356.16 / .2) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.chart-explanation:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.chart-explanation-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.chart-explanation-header:hover {
    background: rgba(25, 14, 79, 0.03);
}

.chart-explanation-header:active {
    transform: scale(0.98);
}

.toggle-icon {
    border: none;
    background: rgba(25, 14, 79, 0.05);
    color: var(--primary);
    border-radius: 20px;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.chart-explanation-header:hover .toggle-icon {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.chart-explanation .transition-icon {
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.chart-explanation-header[aria-expanded="true"] .transition-icon {
    transform: rotate(180deg);
}

.explanation-content {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(25, 14, 79, 0.1);
}

.explanation-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(25, 14, 79, 0.08);
}

.explanation-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.explanation-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.explanation-text {
    flex: 1;
}

.explanation-text h6 {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    margin-bottom: 0.25rem;
}

.explanation-text p {
    color: var(--text);
    line-height: 1.4;
    opacity: 0.9;
}

.explanation-tip {
    background: linear-gradient(135deg, #fff9c4 0%, rgba(255, 249, 196, 0.3) 100%);
    border: 1px solid #f0e68c;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
}

.explanation-tip strong {
    color: var(--primary);
}

/* Card header clickable link styles */
.card-header-link {
    display: block;
    color: inherit;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.5rem -0.5rem;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(146, 93, 106, 0.1) 100%);
}

.card-header-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(146, 93, 106, 0.2) 100%);
    color: inherit;
    text-decoration: none;
    transform: translateY(-1px);
}

.card-header-link:hover .card-title {
    color: var(--primary);
}

.card-header-link:hover .card-subtitle {
    color: var(--accent-dark);
}

.card-header-link::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.card-header-link:hover::after {
    border-color: var(--accent);
    opacity: 0.3;
}

/* Primary progress button */
.btn-progress-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(25, 14, 79, 0.2);
    padding: 0.5rem 1rem;
}

.btn-progress-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(25, 14, 79, 0.3);
}

.btn-progress-primary:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

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

/* Card action buttons area */
.card-actions {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Minimalist edit icon button */
.btn-icon-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(146, 93, 106, 0.1);
    color: var(--accent-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.875rem;
}

.btn-icon-edit:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(146, 93, 106, 0.3);
    border-color: var(--accent);
}

.btn-icon-edit:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Subtle archive button */
.btn-archive-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-archive-subtle:hover {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
    transform: translateY(-1px);
    border-color: rgba(108, 117, 125, 0.3);
}

.btn-archive-subtle:focus {
    outline: 2px solid #6c757d;
    outline-offset: 2px;
}

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

/* Subtle delete button */
.btn-delete-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-delete-subtle:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #c82333;
    transform: translateY(-1px);
    border-color: rgba(220, 53, 69, 0.3);
}

.btn-delete-subtle:focus {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

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

/* Edit Book Page Styling */
.edit-book-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    box-shadow: 0 4px 15px rgba(25, 14, 79, 0.2);
}

.header-icon i {
    font-size: 1.75rem;
    color: white;
}

.page-header h1 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text);
    opacity: 0.8;
}

/* Enhanced Form Card */
.edit-book-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    background: white;
}

.edit-book-card .card-header {
    background: linear-gradient(135deg, var(--secondary) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-bottom: 1px solid rgba(146, 93, 106, 0.1);
    padding: 1.5rem;
}

.edit-book-card .card-title {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.edit-book-card .card-title i {
    color: var(--accent);
    font-size: 1.1rem;
}

.edit-book-card .card-body {
    padding: 2rem;
}

/* Enhanced Form Groups */
.form-group-enhanced {
    position: relative;
}

.form-label-enhanced {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.form-label-enhanced i {
    color: var(--accent);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.form-control-enhanced {
    border: 2px solid rgba(146, 93, 106, 0.2);
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control-enhanced:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(146, 93, 106, 0.15);
    background: white;
    transform: translateY(-1px);
}

.form-control-enhanced:hover {
    border-color: var(--accent);
    background: white;
}

.form-control-enhanced::placeholder {
    color: rgba(25, 14, 79, 0.4);
    font-style: italic;
}

/* Dates Section */
.dates-section {
    background: linear-gradient(135deg, rgba(146, 93, 106, 0.05) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(146, 93, 106, 0.1);
    height: fit-content;
}

.section-title {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(146, 93, 106, 0.2);
    display: flex;
    align-items: center;
}

.section-title i {
    color: var(--accent);
}

/* Form Actions */
.form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-save {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(146, 93, 106, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-save:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(146, 93, 106, 0.4);
}

.btn-save:focus {
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(146, 93, 106, 0.25);
}

.btn-cancel {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 2px solid rgba(108, 117, 125, 0.2);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel:hover {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
    text-decoration: none;
    border-color: rgba(108, 117, 125, 0.3);
    transform: translateY(-1px);
}

/* Preview Card */
.preview-card {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(25, 14, 79, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.preview-card .card-title {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.preview-card .card-title i {
    color: var(--accent);
}

.progress-preview {
    margin-top: 1rem;
}

.progress-label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

.progress-value {
    font-weight: 600;
    color: var(--primary);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.progress-preview-bar {
    height: 8px;
    background: rgba(146, 93, 106, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-preview-bar .progress-bar {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .edit-book-container {
        padding: 1rem;
    }
    
    .header-icon {
        width: 50px;
        height: 50px;
        margin-right: 1rem;
    }
    
    .header-icon i {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .edit-book-card .card-body {
        padding: 1.5rem;
    }
    
    .dates-section {
        margin-top: 2rem;
        padding: 1.25rem;
    }
    
    .form-actions {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .form-actions > div {
        flex-direction: column-reverse;
        gap: 1rem;
    }
    
    .btn-save,
    .btn-cancel {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .edit-book-container {
        padding: 0.75rem;
    }
    
    .page-header {
        text-align: center;
    }
    
    .page-header .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .header-icon {
        margin-right: 0;
    }
    
    .edit-book-card .card-header {
        padding: 1.25rem;
    }
    
    .edit-book-card .card-body {
        padding: 1.25rem;
    }
    
    .form-control-enhanced {
        padding: 0.75rem 1rem;
    }
    
    .dates-section {
        padding: 1rem;
    }
}

/* Quick Date Selection Buttons */
.quick-date-buttons {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(146, 93, 106, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(146, 93, 106, 0.1);
}

.form-label-small {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-dark);
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-label-small i {
    color: var(--accent);
    font-size: 0.8rem;
}

.btn-date-quick {
    background: rgba(146, 93, 106, 0.1);
    color: var(--accent-dark);
    border: 1px solid rgba(146, 93, 106, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-date-quick:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(146, 93, 106, 0.25);
}

.btn-date-quick:active {
    transform: translateY(0);
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-date-quick:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    color: white;
    background: var(--accent);
    border-color: var(--accent);
}

/* Date Updated Animation */
.date-updated {
    animation: dateHighlight 1s ease-in-out;
}

@keyframes dateHighlight {
    0% {
        background-color: rgba(146, 93, 106, 0.15);
        border-color: var(--accent);
        transform: scale(1);
    }
    50% {
        background-color: rgba(146, 93, 106, 0.25);
        border-color: var(--accent-dark);
        transform: scale(1.02);
    }
    100% {
        background-color: rgba(255, 255, 255, 0.8);
        border-color: rgba(146, 93, 106, 0.2);
        transform: scale(1);
    }
}

/* Responsive adjustments for quick date buttons */
@media (max-width: 576px) {
    .quick-date-buttons {
        padding: 0.75rem;
    }
    
    .btn-date-quick {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: 0;
    }
    
    .quick-date-buttons .d-flex {
        gap: 0.5rem !important;
    }
}

@media (max-width: 400px) {
    .quick-date-buttons .d-flex {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .btn-date-quick {
        width: 100%;
    }
}

/* Enhanced Navigation Styles */

/* Admin dropdown styling */
.admin-dropdown {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.admin-dropdown:hover {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: rgba(220, 53, 69, 0.3);
    color: #dc3545 !important;
}

.admin-dropdown i {
    color: #dc3545;
    margin-right: 0.5rem;
}

/* Actions dropdown enhancement */
#actionsDropdown {
    transition: all 0.3s ease;
}

#actionsDropdown:hover {
    background: rgba(146, 93, 106, 0.1);
    border-radius: 6px;
    color: var(--accent) !important;
}

/* Upgrade button styling */
.btn-upgrade-link {
    background: linear-gradient(135deg, #f0ad4e 0%, #ec971f 100%);
    color: white !important;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(240, 173, 78, 0.3);
}

.btn-upgrade-link:hover {
    color: white !important;
    background: linear-gradient(135deg, #ec971f 0%, #d58512 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(240, 173, 78, 0.4);
}

.btn-upgrade-link i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Enhanced dropdown menus */
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.navbar .dropdown-item:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, rgba(255, 255, 255, 0.8) 100%);
    color: var(--primary);
    transform: translateX(5px);
}

.navbar .dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--accent);
    font-size: 0.9rem;
}

.navbar .dropdown-divider {
    margin: 0.5rem 1rem;
    opacity: 0.3;
}

/* Improved mobile navigation */
@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(146, 93, 106, 0.1);
        margin-top: 0.25rem;
        margin-left: 1rem;
        width: calc(100% - 2rem);
    }
    
    .navbar-nav .dropdown-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-upgrade-link {
        margin: 0.5rem 0;
        text-align: center;
        border-radius: 25px;
    }
    
    .admin-dropdown {
        margin: 0.25rem 0;
    }
}

/* Navigation item icons */
.nav-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Better visual hierarchy */
.navbar-nav > .nav-item > .nav-link {
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.navbar-nav > .nav-item > .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transform: translateY(-1px);
}

/* Dropdown toggle arrow animation */
.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* User dropdown improvements */
.user-dropdown .user-avatar {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    box-shadow: 0 2px 8px rgba(146, 93, 106, 0.3);
}

.dropdown-menu.dropdown-menu-end .dropdown-item {
    justify-content: flex-start;
}

/* Plan badge enhancements */
.plan-badge.badge-premium {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
    box-shadow: 0 2px 8px rgba(146, 93, 106, 0.3);
    border-radius: 15px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    display: block;
    width: fit-content;
    margin: 0 auto;
}

/* Navigation responsiveness improvements */
@media (max-width: 576px) {
    .navbar-brand img {
        height: 32px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .dropdown-item {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* Active Navigation States */

/* Active states for main navigation links */
.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 8px;
    color: white !important;
    font-weight: 600;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

.navbar-nav .nav-link.active::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 20px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    transform: translateX(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-nav .nav-link.active i {
    color: var(--secondary) !important;
}

/* Active state for upgrade button */
.btn-upgrade-link.active {
    background: linear-gradient(135deg, #d58512 0%, #b8680a 100%) !important;
    box-shadow: 0 6px 20px rgba(240, 173, 78, 0.6) !important;
    transform: translateY(-3px) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.btn-upgrade-link.active i {
    animation: none !important;
    transform: scale(1.2);
}

/* Active state for admin dropdown */
.admin-dropdown.active {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%) !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
}

.admin-dropdown.active i {
    color: #fff !important;
}

/* Active state for actions dropdown */
#actionsDropdown.active {
    background: linear-gradient(135deg, rgba(146, 93, 106, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%) !important;
    border-radius: 8px !important;
    color: white !important;
    font-weight: 600;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(146, 93, 106, 0.3);
}

#actionsDropdown.active i {
    color: var(--secondary) !important;
}

/* Active states for dropdown items */
.dropdown-item.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
    color: white !important;
    font-weight: 600;
    transform: translateX(8px);
    box-shadow: 0 2px 8px rgba(146, 93, 106, 0.3);
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

.dropdown-item.active i {
    color: var(--secondary) !important;
}

.dropdown-item.active:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%) !important;
    color: white !important;
    transform: translateX(10px);
}

/* Mobile responsiveness for active states */
@media (max-width: 991px) {
    .navbar-nav .nav-link.active::before {
        display: none;
    }
    
    .navbar-nav .nav-link.active {
        margin: 0.25rem 0;
        background: linear-gradient(135deg, rgba(146, 93, 106, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
        border-radius: 8px;
        padding: 0.75rem 1rem;
    }
    
    .btn-upgrade-link.active {
        transform: none !important;
        box-shadow: 0 3px 10px rgba(240, 173, 78, 0.4) !important;
    }
    
    .admin-dropdown.active,
    #actionsDropdown.active {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Enhanced hover effects when not active */
.navbar-nav .nav-link:not(.active):hover {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

/* Smooth transitions for all navigation items */
.navbar-nav .nav-link,
.dropdown-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active state persistence animation */
@keyframes activeGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }
}

.navbar-nav .nav-link.active {
    animation: activeGlow 3s ease-in-out infinite;
}

/* Focus states for accessibility */
.navbar-nav .nav-link.active:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.btn-upgrade-link.active:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.admin-dropdown.active:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* User dropdown active states */
.dropdown-menu.dropdown-menu-end .dropdown-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%) !important;
    color: white !important;
    font-weight: 600;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(25, 14, 79, 0.3);
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

.dropdown-menu.dropdown-menu-end .dropdown-item.active i {
    color: var(--secondary) !important;
}

.dropdown-menu.dropdown-menu-end .dropdown-item.active:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--primary) 100%) !important;
    color: white !important;
    transform: translateX(8px);
}

/* Special active state indicator for main nav items */
.navbar-nav .nav-item .nav-link.active {
    position: relative;
    overflow: visible;
}

@keyframes activePulse {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* Improved accessibility and visual feedback */
.navbar-nav .nav-link.active,
.dropdown-item.active {
    position: relative;
}

.navbar-nav .nav-link.active:focus-visible,
.dropdown-item.active:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

/* Active state priority over hover */
.navbar-nav .nav-link.active:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%) !important;
    transform: translateY(-2px) !important;
}

.btn-upgrade-link.active:hover {
    background: linear-gradient(135deg, #b8680a 0%, #996d09 100%) !important;
    transform: translateY(-4px) !important;
}

/* Mobile-specific active state adjustments */
@media (max-width: 768px) {   
    .navbar-nav .nav-link.active {
        margin: 0.125rem 0;
    }
}

/* Milestone Management Styles */
.milestone-item {
    transition: all 0.2s ease;
}

.milestone-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.milestone-item .btn {
    font-size: 0.75rem;
    line-height: 1;
}
