:root {
    --primary: #4D8EF6;
    --border: #E2E8F0;
    --bg: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
}

body {
    background-color: var(--bg);
}

.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-info,
.btn-warning,
.btn-outline-primary,
.btn-outline-secondary,
.btn-light,
.btn-dark {
    background-image: none !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0.3125rem 0.875rem !important;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.08) !important;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover,
.btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--btn-glow, rgba(15, 23, 42, 0.12)) !important;
}

.btn .btn-label {
    position: static;
    display: inline-block;
    padding: 0;
    margin-right: 0.45rem;
    background: transparent;
    border-radius: 0;
}

.btn .btn-label:empty,
.btn-sm .btn-label {
    margin-right: 0.3rem;
}

.btn:active {
    transform: translateY(0);
    box-shadow: none !important;
}

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

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: btn-ripple 0.6s ease-out forwards;
    pointer-events: none;
}

.btn-secondary .btn-ripple,
.btn-outline-secondary .btn-ripple {
    background: rgba(15, 23, 42, 0.12);
}

@keyframes btn-ripple {
    to {
        transform: scale(1);
        opacity: 0;
    }
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

button.btn.is-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 0.5rem;
    vertical-align: -2px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Login page submit button: restore gradient stripped by the .btn reset above */
.btn-login {
    background: linear-gradient(135deg, #F51D93 0%, #627BFF 100%) !important;
    background-image: linear-gradient(135deg, #F51D93 0%, #627BFF 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    width: 100%;
    height: 52px !important;
    padding: 0 20px !important;
    font-size: 15px !important;
    font-weight: 600;
}

.btn-login:hover,
.btn-login:focus {
    color: #fff !important;
    background: linear-gradient(135deg, #F51D93 0%, #627BFF 100%) !important;
    background-image: linear-gradient(135deg, #F51D93 0%, #627BFF 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 29, 147, 0.2) !important;
}

.wipe-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.wipe-overlay[hidden] {
    display: none !important;
}

.wipe-dialog {
    width: 100%;
    max-width: 28rem;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.cal-nav h5 {
    color: var(--text-main);
    font-weight: 600;
    margin: 0;
    font-size: 1.125rem;
    text-transform: capitalize;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.cal-weekday {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 10px;
    color: var(--text-muted);
}

a.cal-day.has-plans {
    color: var(--text-main);
    font-weight: 600;
    background: #EFF6FF;
}

a.cal-day.has-plans:hover {
    background: #DBEAFE;
    text-decoration: none;
    transform: translateY(-1px);
}

.cal-number {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid transparent;
}

.cal-day.today .cal-number {
    border-color: var(--primary);
}

.cal-day.selected {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.cal-dots {
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 0.5rem;
}

.cal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.cal-count {
    font-size: 0.65rem;
    color: var(--primary);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .btn {
        transition: none !important;
    }
    .btn:hover {
        transform: none !important;
    }
    .btn-ripple {
        display: none !important;
    }
    button.btn.is-loading::after {
        animation: none !important;
    }
}

.btn-sm {
    font-size: 0.78rem;
    padding: 0.1875rem 0.625rem !important;
}

.btn-primary {
    --btn-glow: rgba(77, 142, 246, 0.35);
    background-color: var(--primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #3B7DEE !important;
    color: #fff !important;
}

.btn-secondary {
    background-color: #F1F5F9 !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #E2E8F0 !important;
    color: var(--text-main) !important;
}

.btn-success {
    --btn-glow: rgba(16, 185, 129, 0.35);
    background-color: #10B981 !important;
    color: #fff !important;
}

.btn-success:hover,
.btn-success:focus {
    background-color: #0EA371 !important;
    color: #fff !important;
}

.btn-danger {
    --btn-glow: rgba(239, 68, 68, 0.35);
    background-color: #EF4444 !important;
    color: #fff !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: #DC2626 !important;
    color: #fff !important;
}

.btn-info {
    --btn-glow: rgba(14, 165, 233, 0.35);
    background-color: #0EA5E9 !important;
    color: #fff !important;
}

.btn-info:hover,
.btn-info:focus {
    background-color: #0284C7 !important;
    color: #fff !important;
}

.btn-warning {
    --btn-glow: rgba(245, 158, 11, 0.35);
    background-color: #F59E0B !important;
    color: #fff !important;
}

.btn-warning:hover,
.btn-warning:focus {
    background-color: #D97706 !important;
    color: #fff !important;
}

.btn-outline-primary {
    background-color: transparent !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    background-color: transparent !important;
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #F1F5F9 !important;
    color: var(--text-main) !important;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(77, 142, 246, 0.15);
}

.table thead th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.table td,
.table th {
    vertical-align: middle;
    border-color: var(--border);
}

.card-modern {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: var(--text-main);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EFF6FF;
    color: var(--primary);
    flex-shrink: 0;
}

.card-modern .card-header {
    border-bottom: 1px solid var(--border);
    background: transparent;
    padding: 1.5rem;
}

.card-modern .card-header h5 {
    color: var(--text-main);
    font-weight: 600;
    margin: 0;
    font-size: 1.125rem;
}

.card-modern .card-body {
    padding: 1.5rem;
}

.chart-container {
    position: relative;
}

.chart-title {
    color: var(--text-main);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.mini-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 1rem !important;
}

.mini-card .icon-box {
    margin-bottom: 0;
    margin-right: 0.75rem;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.mini-card .stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
    text-truncate;
}

.quick-actions-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .quick-actions-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .quick-actions-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

.dashboard-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Override Legacy Timeline */
#content.shadow {
    box-shadow: none !important;
    background: transparent !important;
}

ul.dashboard-timeline {
    list-style-type: none;
    padding: 0;
    position: relative;
}

ul.dashboard-timeline:before {
    display: none;
}

/* New Clean List Style */
li.dashboard-event {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    padding-left: 24px; /* Added spacing for the bar */
    margin-bottom: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
}

li.dashboard-event h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

li.dashboard-event h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

li.dashboard-event p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

li.dashboard-event:before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    background-color: var(--primary);
    border-radius: 0 4px 4px 0;
}
