:root {

    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    --bg-hover: #30363d;

    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    --accent-green: #238636;
    --accent-green-hover: #2ea043;
    --accent-blue: #58a6ff;
    --accent-yellow: #d29922;
    --accent-red: #f85149;
    --accent-purple: #a371f7;

    --border-color: #30363d;
    --border-light: #21262d;


    --sidebar-width: 260px;
    --header-height: 60px;
    --border-radius: 8px;
    --border-radius-lg: 12px;


    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);


    --transition: all 0.2s ease;
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--text-primary);
}


.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-footer {
    margin-top: auto;
    padding: 24px 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.app-footer,
.app-footer a {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: var(--transition);
}

.app-footer a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .app-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--text-primary);
}


.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.user-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(35, 134, 54, 0.15);
    color: var(--accent-green);
    border-left-color: var(--accent-green);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}


.sidebar .btn-create {
    margin: 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--accent-green);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.sidebar .btn-create:hover {
    background: var(--accent-green-hover);
    color: white;
}

.sidebar-support {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.support-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.support-link:hover {
    color: var(--accent-purple);
    background: var(--bg-hover);
}

.support-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.support-link:hover svg {
    color: #e25555;
}


.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}


.chart-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.chart-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.green {
    background: rgba(35, 134, 54, 0.2);
    color: var(--accent-green);
}

.stat-icon.blue {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-blue);
}

.stat-icon.yellow {
    background: rgba(210, 153, 34, 0.2);
    color: var(--accent-yellow);
}

.stat-icon.red {
    background: rgba(248, 81, 73, 0.2);
    color: var(--accent-red);
}

.stat-icon.purple {
    background: rgba(163, 113, 247, 0.2);
    color: var(--accent-purple);
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-trend {
    font-size: 0.75rem;
    margin-top: 4px;
}

.stat-trend.up {
    color: var(--accent-green);
}

.stat-trend.down {
    color: var(--accent-red);
}


.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.status-card:hover {
    background: var(--bg-hover);
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon.success {
    background: var(--accent-green);
    color: white;
}

.status-icon.warning {
    background: var(--accent-yellow);
    color: white;
}

.status-icon.danger {
    background: var(--accent-red);
    color: white;
}

.status-content {
    flex: 1;
}

.status-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-value {
    font-size: 1rem;
    font-weight: 600;
}

.status-arrow {
    color: var(--text-muted);
}


.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-draft {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.badge-sent {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-blue);
}

.badge-paid {
    background: rgba(35, 134, 54, 0.2);
    color: var(--accent-green);
}

.badge-overdue {
    background: rgba(248, 81, 73, 0.2);
    color: var(--accent-red);
}

.badge-cancelled {
    background: var(--bg-hover);
    color: var(--text-muted);
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--accent-green);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-green-hover);
    color: white;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #da3633;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}


.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: var(--accent-red);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.75rem;
    color: var(--accent-red);
    margin-top: 4px;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group-append {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}


.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-green);
    cursor: pointer;
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
}


.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table td {
    font-size: 0.9rem;
}

.table-actions {
    display: flex;
    gap: 8px;
}


.alert {
    padding: 14px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: rgba(35, 134, 54, 0.15);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
}

.alert-error {
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(210, 153, 34, 0.15);
    border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow);
}

.alert-info {
    background: rgba(88, 166, 255, 0.15);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
}


.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}


.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 24px;
}

.pagination-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pagination-item.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state svg {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}


.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.mobile-menu-toggle {
    display: none;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
        overflow-x: hidden;
    }

    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 999;
        width: 44px;
        height: 44px;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        cursor: pointer;
        box-shadow: var(--shadow-md);
        transition: var(--transition);
    }

    .mobile-menu-toggle:hover {
        background: var(--bg-hover);
        border-color: var(--text-muted);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .page-header {
        margin-top: 60px;
    }

    .page-header.d-flex {
        flex-wrap: wrap;
        gap: 12px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 14px 20px;
    }

    .chart-scroll-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-header .btn {
        width: 100%;
    }

    .table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .table-actions {
        flex-direction: column;
        gap: 4px;
    }

    .table-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 32px);
        margin: 16px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 8px 12px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .status-card {
        padding: 14px 16px;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .empty-state {
        padding: 40px 16px;
    }

    .empty-state svg {
        width: 60px;
        height: 60px;
    }

    .form-control {
        padding: 12px 14px;
        font-size: 16px;
    }

    select.form-control {
        font-size: 16px;
    }

    .form-check-input {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }

    .page-header {
        margin-bottom: 16px;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .stat-card {
        text-align: left;
        flex-direction: row;
    }

    .stat-icon {
        margin: 0;
    }

    .alert {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .card-title {
        font-size: 0.9rem;
    }

    .nav-item {
        padding: 12px 20px;
    }

    .page-header.d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header .btn {
        width: 100%;
    }
}


.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-secondary);
}

.text-success {
    color: var(--accent-green);
}

.text-danger {
    color: var(--accent-red);
}

.text-warning {
    color: var(--accent-yellow);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.w-100 {
    width: 100%;
}

.hidden {
    display: none !important;
}


.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-month-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 180px;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.calendar-day-name {
    padding: 10px 8px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--bg-card);
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: var(--bg-hover);
}

.calendar-day.other-month {
    background: var(--bg-primary);
}

.calendar-day.other-month .calendar-day-number {
    color: var(--text-muted);
}

.calendar-day.today {
    background: rgba(35, 134, 54, 0.05);
}

.calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 50%;
    margin-bottom: 4px;
}

.calendar-day-number.today-circle {
    background: var(--accent-green);
    color: white;
    font-weight: 700;
}

.calendar-event {
    padding: 2px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.calendar-event:hover {
    opacity: 0.8;
    transform: translateX(2px);
}

.upcoming-event-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.upcoming-event-card:last-child {
    border-bottom: none;
}

.upcoming-event-card:hover {
    background: var(--bg-hover);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: var(--border-radius);
}

.upcoming-event-color {
    width: 4px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

.upcoming-event-info {
    flex: 1;
    min-width: 0;
}

.upcoming-event-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.upcoming-event-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.upcoming-event-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upcoming-event-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
}

.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    cursor: pointer;
    display: flex;
}

.color-option input[type="radio"] {
    display: none;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: var(--transition);
}

.color-option input[type="radio"]:checked+.color-swatch {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--text-muted);
}

.color-swatch:hover {
    transform: scale(1.15);
}

@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .calendar-nav {
        justify-content: center;
    }

    .calendar-header .btn-primary {
        width: 100%;
    }

    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .calendar-day-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .calendar-event {
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    .calendar-month-title {
        font-size: 1rem;
        min-width: 140px;
    }
}