/**
 * Admin Dashboard CSS
 * Modern business-focused design
 */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Login Section */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-left: 3px solid #c33;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 78, 138, 0.4);
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdb;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

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

/* Profile form buttons */
#profile-form .btn-primary,
#password-form .btn-primary {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Section */
.dashboard-container {
    min-height: 100vh;
    background: #f5f7fa;
}

.dashboard-nav {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.version-badge {
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Avatar Dropdown */
.avatar-dropdown {
    position: relative;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.admin-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.4);
}

.avatar-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s ease;
}

.avatar-menu.hidden {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.avatar-menu-header {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e6ed;
}

.avatar-fullname {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-menu-divider {
    height: 1px;
    background: #e0e6ed;
}

.avatar-menu-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
    transition: background 0.2s, color 0.2s;
}

.avatar-menu-item:hover {
    background: #f5f7fa;
    color: #d6336c;
}

.avatar-menu-item-logout {
    color: #e74c3c;
}

.avatar-menu-item-logout:hover {
    background: #fdf2f2;
    color: #c0392b;
}

.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e6ed;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    color: #7f8c8d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: #d6336c;
}

.tab-btn.active {
    color: #d6336c;
    border-bottom-color: #d6336c;
    font-weight: 600;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

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

.kpi-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-top: auto;
}

.kpi-card.today {
    border-left: 4px solid #d6336c;
}

.kpi-card.month {
    border-left: 4px solid #e8a4bc;
}

.kpi-card.cancelled {
    border-left: 4px solid #dc5656;
}

.kpi-card.revenue {
    border-left: 4px solid #4d8b7a;
}

.kpi-card.pending {
    border-left: 4px solid #e8a4bc;
}

/* Two Column Layout */
.two-column-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Section Cards */
.section-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.section-card h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e6ed;
}

/* Next Appointment Timer Banner */
.next-appointment-banner {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(51, 65, 85, 0.3);
}

.timer-content {
    text-align: center;
}

.timer-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.countdown-boxes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    min-width: 52px;
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-unit {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.countdown-separator {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.6;
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
}

.countdown-in-progress {
    font-size: 1.25rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    animation: pulse-soft 2s ease-in-out infinite;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.next-apt-details {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Appointment Items - Compact Version */
.appointment-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Upcoming Appointment Cards - Modern Design */
.appointment-item {
    background: white;
    border-radius: 8px;
    border-left: 4px solid #d6336c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    overflow: hidden;
}

.appointment-item:hover {
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.15);
    transform: translateY(-2px);
}

.apt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.apt-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apt-countdown {
    font-size: 0.75rem;
    font-weight: 500;
    color: #d6336c;
    background: #eef2ff;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

.apt-countdown.urgent {
    color: #dc2626;
    background: #fef2f2;
}

.apt-card-body {
    padding: 1rem;
}

.apt-client {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.apt-service {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.apt-price {
    font-size: 1.125rem;
    font-weight: 600;
    color: #d6336c;
    margin-top: 0.5rem;
}

.apt-message {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f0f4ff;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.apt-message .message-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.apt-reschedule-reason {
    font-size: 0.8rem;
    color: #c2410c;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff7ed;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.apt-reschedule-reason .message-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.apt-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #fafafa;
    border-top: 1px solid #e2e8f0;
}

.apt-payment {
    font-size: 0.8rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    white-space: nowrap;
}

.apt-payment.payment-success {
    background: #dcfce7;
    color: #166534;
}

.apt-payment.payment-pending {
    background: #fef3c7;
    color: #92400e;
}

.apt-payment.payment-authorized {
    background: #fef3c7;
    color: #92400e;
}

.apt-payment.payment-failed {
    background: #fee2e2;
    color: #dc2626;
}

.apt-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-apt-cancel {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-apt-cancel:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.btn-apt-reschedule {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    background: #d6336c;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-apt-reschedule:hover {
    background: #5a67d8;
}

.view-more {
    text-align: center;
    padding: 0.75rem;
    color: #d6336c;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.5rem;
    cursor: default;
}

.pagination-info {
    text-align: center;
    padding: 0.75rem;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 0;
}

.btn-pagination {
    padding: 0.5rem 1rem;
    background: #d6336c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-pagination:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
}

.btn-pagination:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Revenue Cards */
.revenue-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.revenue-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.revenue-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #7f8c8d;
    border: none;
}

.revenue-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.revenue-card.pending .revenue-amount {
    color: #f39c12;
}

.revenue-card.captured .revenue-amount {
    color: #4d8b7a;
}

.revenue-card small {
    color: #95a5a6;
    font-size: 0.85rem;
}

.revenue-detail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.revenue-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.revenue-label {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

.revenue-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #4d8b7a;
}

/* Table Wrapper */
.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Tables */
.data-table, .stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead, .stats-table thead {
    background: #f8f9fa;
}

.data-table th, .stats-table th,
.data-table td, .stats-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e6ed;
}

.data-table th, .stats-table th {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td, .stats-table td {
    color: #34495e;
}

.data-table tbody tr:hover,
.stats-table tbody tr:hover {
    background: #f8f9fa;
}

/* Expandable Service Stats Rows */
.service-row.expandable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.service-row.expandable:hover {
    background: #e8f4fd;
}

.expand-icon {
    display: inline-block;
    width: 16px;
    margin-right: 8px;
    color: #d6336c;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.expand-icon.expanded {
    transform: rotate(0deg);
}

.expand-placeholder {
    display: inline-block;
    width: 24px;
}

.service-details-row {
    background: #f8fafc;
}

.service-details-row:hover {
    background: #f8fafc !important;
}

.service-details {
    padding: 1rem;
    border-left: 3px solid #d6336c;
    margin-left: 24px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.details-table thead {
    background: #f1f5f9;
}

.details-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 500;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
    color: #334155;
}

.details-table tbody tr:last-child td {
    border-bottom: none;
}

.details-table tbody tr:hover {
    background: #f8fafc;
}

/* Status badges for service details */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-completed {
    background: #dbeafe;
    color: #1e40af;
}

.status-no_show {
    background: #fef3c7;
    color: #92400e;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending_payment {
    background: #fef3c7;
    color: #d97706;
    border: 1px dashed #d97706;
}

.data-table a {
    color: #d6336c;
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.btn-read-reason {
    background: #f0f4ff;
    color: #d6336c;
    border: 1px solid #d6336c;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-read-reason:hover {
    background: #d6336c;
    color: #fff;
}

.meet-link {
    background: #fff;
    color: #5568d3;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #5568d3;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    box-sizing: border-box;
    width: 90%;
}

.meet-link:hover {
    background: #5568d3;
    color: #fff;
    text-decoration: none;
}

.btn-action {
    background: #fff;
    color: #dc2626;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid #dc2626;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 32px;
    box-sizing: border-box;
}

.btn-action:hover {
    background: #dc2626;
    color: #fff;
}

.btn-capture {
    background: #fff;
    color: #f59e0b;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #f59e0b;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-capture:hover {
    background: #f59e0b;
    color: #fff;
}

.btn-capture:disabled {
    background: #e0e0e0;
    color: #999;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-cancel {
    background: #fff;
    color: #6b7280;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1.5px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel:hover {
    background: #6b7280;
    color: #fff;
    border-color: #6b7280;
}

/* Boutons icônes pour actions */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1.5px solid;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.btn-icon-report {
    color: #dc2626;
    border-color: #dc2626;
}

.btn-icon-report:hover {
    background: #dc2626;
    color: #fff;
}

.btn-icon-cancel {
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-icon-cancel:hover {
    background: #6b7280;
    color: #fff;
    border-color: #6b7280;
}

.btn-icon-capture {
    color: #f59e0b;
    border-color: #f59e0b;
}

.btn-icon-capture:hover {
    background: #f59e0b;
    color: #fff;
}

.btn-icon-noshow {
    color: #856404;
    border-color: #856404;
}

.btn-icon-noshow:hover {
    background: #856404;
    color: #fff;
}

.btn-icon:disabled {
    background: #e0e0e0;
    color: #999;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.no-meet-link {
    background: #e8eaf6;
    color: #5568d3;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c5cae9;
    height: 32px;
    box-sizing: border-box;
    min-width: 80px;
}

.no-actions {
    background: #e8eaf6;
    color: #5568d3;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.payment-success {
    color: #4d8b7a;
    font-weight: 600;
}

.payment-pending {
    color: #f39c12;
    font-weight: 600;
}

.payment-authorized {
    color: #f59e0b;
    font-weight: 600;
}

.payment-failed {
    color: #e74c3c;
    font-weight: 600;
}

.payment-unknown {
    color: #95a5a6;
    font-weight: 600;
}

.table-footer {
    background: #f8f9fa;
    padding: 0.875rem 1rem;
    text-align: right;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #e0e6ed;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.filter-controls label {
    color: #7f8c8d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-controls select {
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-controls select:hover {
    border-color: #d6336c;
    background-color: #f8f9ff;
}

.filter-controls select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
    background-color: white;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Technical Sections */
.technical-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.metric-card h4 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.metric-card p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Loading & Messages */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
}

.error {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #c33;
}

.info-message {
    background: #e8f4f8;
    color: #31708f;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #31708f;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #95a5a6;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e6ed;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #2c3e50;
}

.modal-body {
    color: #34495e;
    line-height: 1.6;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Password Verification Modal */
#password-verification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

#password-verification-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

#password-verification-modal .modal-header {
    justify-content: center;
    border-bottom: none;
    padding-bottom: 0;
}

#password-verification-modal .modal-header h3 {
    font-size: 1.3rem;
}

#password-verification-modal .modal-body p {
    color: #666;
    margin-bottom: 1.5rem;
}

#verification-code-input {
    width: 100%;
    max-width: 200px;
    padding: 1rem;
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 0.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    margin: 0 auto 1.5rem;
    display: block;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#verification-code-input:focus {
    outline: none;
    border-color: #e94e8a;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.15);
}

#password-verification-modal .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#password-verification-modal .btn-cancel {
    padding: 0.75rem 1.5rem;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

#password-verification-modal .btn-cancel:hover {
    background: #eee;
}

#password-verification-modal .btn-verify {
    padding: 0.75rem 1.5rem;
    background: #e94e8a;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
}

#password-verification-modal .btn-verify:hover {
    background: #d13e74;
}

/* Cancelled Rows */
.cancelled-row {
    background-color: #f5f5f5 !important;
    opacity: 0.6;
}

.cancelled-row:hover {
    background-color: #ebebeb !important;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-confirmed {
    background: #d4edda;
    color: #155724;
}

.badge-completed {
    background: #cce5ff;
    color: #004085;
}

.badge-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.badge-noshow {
    background: #fff3cd;
    color: #856404;
}

.badge-pending-payment {
    background: #fef3c7;
    color: #d97706;
    border: 1px dashed #d97706;
}

/* Disabled Meet Button */
.meet-link.disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

/* Clickable Cards */
.kpi-card.clickable {
    cursor: pointer;
}

.kpi-card.clickable:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Month Selector Styling */
.month-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.month-selector label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

.month-selector select {
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    color: #374151;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 180px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.month-selector select:hover {
    border-color: #d6336c;
    background-color: #f8f9ff;
}

.month-selector select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
    background-color: white;
}

.section-header-with-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e6ed;
}

.section-header-with-controls h4 {
    margin: 0;
    border: none;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-content {
        padding: 1rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .kpi-value {
        font-size: 2rem;
    }

    .revenue-amount {
        font-size: 2rem;
    }

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

/* ============================================
   CALCULATOR TAB STYLES
   ============================================ */

/* Progress Indicators */
.calc-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.calc-step.pending {
    background: #e5e7eb;
    color: #9ca3af;
}

.calc-step.active {
    background: #d6336c;
    color: white;
    box-shadow: 0 0 0 4px rgba(233, 78, 138, 0.2);
}

.calc-step.completed {
    background: #4d8b7a;
    color: white;
}

.calc-connector {
    width: 40px;
    height: 3px;
    background: #e5e7eb;
    transition: background 0.3s ease;
}

.calc-connector.completed {
    background: #4d8b7a;
}

/* Section Styles */
.calc-section {
    transition: all 0.3s ease;
}

.calc-section.calc-locked {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(0.3);
}

/* Badges */
.calc-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.calc-badge.pending {
    background: #e5e7eb;
    color: #6b7280;
}

.calc-badge.active {
    background: #d6336c;
    color: white;
}

.calc-badge.completed {
    background: #4d8b7a;
    color: white;
}

/* Results Row - MB + IMC side by side */
.calc-results-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: stretch;
}

/* Result Box - Clean card design */
.calc-result {
    margin-top: 0;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d6336c;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calc-result-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0;
}

.calc-result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #d6336c;
}

.calc-result-detail {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0;
    margin-left: 0.5rem;
}

/* NAP Result Mini - Compact result display */
.calc-result-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 10px;
}

.calc-result-mini .result-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #166534;
    white-space: nowrap;
}

.calc-result-mini .result-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #15803d;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.calc-result-mini .result-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #bbf7d0;
    color: #166534;
}

.calc-result-mini .result-badge.nap-sedentaire {
    background: #fef3c7;
    color: #92400e;
}

.calc-result-mini .result-badge.nap-peu-actif {
    background: #fed7aa;
    color: #9a3412;
}

.calc-result-mini .result-badge.nap-actif {
    background: #bbf7d0;
    color: #166534;
}

.calc-result-mini .result-badge.nap-tres-actif {
    background: #a7f3d0;
    color: #065f46;
}

/* NAP Row Styles */
.calc-nap-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.calc-nap-info {
    display: flex;
    flex-direction: column;
}

.calc-nap-label {
    font-weight: 600;
    color: #374151;
}

.calc-nap-desc {
    font-size: 0.75rem;
    color: #9ca3af;
}

.calc-nap-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-nap-input input {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
}

.calc-nap-input input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

/* Total Hours */
.calc-total {
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.calc-total.valid {
    background: #d1fae5;
    color: #065f46;
}

.calc-total.invalid {
    background: #fee2e2;
    color: #991b1b;
}

/* NAP Interpretation Badge */
.calc-nap-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.calc-nap-badge.nap-sedentaire {
    background: #fef3c7;
    color: #92400e;
}

.calc-nap-badge.nap-peu-actif {
    background: #fed7aa;
    color: #9a3412;
}

.calc-nap-badge.nap-actif {
    background: #bbf7d0;
    color: #166534;
}

.calc-nap-badge.nap-tres-actif {
    background: #a7f3d0;
    color: #065f46;
}

/* DEJ Formula Display */
.calc-dej-formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 12px;
}

.calc-dej-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-width: 120px;
    width: 140px;
}

.calc-dej-item.calc-dej-result {
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    width: 160px;
    padding: 1.25rem 1.5rem;
}

.calc-dej-label {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calc-dej-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.calc-dej-unit {
    font-size: 0.75rem;
    opacity: 0.7;
}

.calc-dej-operator {
    font-size: 1.5rem;
    font-weight: 300;
    color: #9ca3af;
}

/* FM wrapper dans formule DEJ */
.calc-dej-fm-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Macros Grid */
.calc-macros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.calc-macro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.calc-macro-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
}

.calc-macro-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.calc-macro-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 8;
}

.calc-macro-progress {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}

.calc-macro-protein .calc-macro-progress {
    stroke: #ef4444;
}

.calc-macro-lipid .calc-macro-progress {
    stroke: #f59e0b;
}

.calc-macro-glucid .calc-macro-progress {
    stroke: #4d8b7a;
}

.calc-macro-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #374151;
}

.calc-macro-sep {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}

.calc-macro-label {
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
    margin-bottom: 0.25rem;
}

.calc-macro-unit {
    font-size: 0.75rem;
    color: #9ca3af;
}

.calc-macro-percent {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
}

/* Calculator Form Selects */
.calc-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d6336c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.calc-select:hover {
    border-color: #d6336c;
}

.calc-select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.15);
}

/* Patient Select Styled */
.calc-patient-select-wrapper {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.calc-patient-select {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 1rem;
    color: #2c3e50;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.calc-patient-select:hover {
    border-color: #d6336c;
}

.calc-patient-select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 4px rgba(233, 78, 138, 0.15);
}

.calc-patient-select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #d6336c;
    pointer-events: none;
}

.calc-patient-select option {
    padding: 0.75rem;
}

.calc-patient-controls {
    display: flex;
    gap: 1rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.calc-patient-controls .btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    white-space: nowrap;
    border-radius: 10px;
    border: 2px solid #e0e6ed;
    background: white;
    transition: all 0.3s ease;
}

.calc-patient-controls .btn-secondary:hover {
    border-color: #d6336c;
    background: #f8f9ff;
}

.calc-patient-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #d6336c;
    font-size: 0.875rem;
    color: #1e40af;
}

.calc-patient-info.has-data {
    background: #f0fdf4;
    border-left-color: #4d8b7a;
    color: #166534;
}

.calc-patient-info i {
    font-size: 1rem;
}

/* Calculator Actions */
.calc-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.calc-save-btn,
.calc-reset-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 52px;
}

.calc-save-btn {
    background: linear-gradient(135deg, #e94e8a 0%, #d13e74 100%);
    color: white;
}

.calc-save-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 78, 138, 0.4);
}

.calc-save-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.calc-reset-btn {
    background: white;
    color: #2c3e50;
    border: 2px solid #e0e6ed;
}

.calc-reset-btn:hover {
    border-color: #d6336c;
    background: #f8f9ff;
}

.calc-save-btn i,
.calc-reset-btn i {
    font-size: 1rem;
}

/* ============================================
   CANCEL MODAL STYLES
   ============================================ */

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Cancel Modal Content */
.cancel-modal-content {
    max-width: 550px;
}

.cancel-modal-content .modal-header h2 {
    font-size: 1.25rem;
    color: #dc2626;
}

/* Cancel Info Section */
.cancel-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.patient-info {
    font-size: 0.95rem;
}

.patient-info .text-muted {
    color: #6b7280;
    font-size: 0.85rem;
}

.appointment-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.appointment-info .badge {
    background: #d6336c;
    color: white;
}

.appointment-info .service-name {
    color: #4b5563;
    font-size: 0.9rem;
}

.appointment-info .price {
    font-weight: 600;
    color: #3d7a6a;
}

/* Penalty Suggestion */
.penalty-suggestion {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.penalty-suggestion.has-penalty {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.penalty-suggestion.no-penalty {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.suggestion-header {
    font-size: 0.85rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.suggestion-details {
    display: flex;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.suggestion-details .percentage {
    color: #dc2626;
}

.suggestion-details .amount {
    color: #dc2626;
}

.suggestion-reason {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.hours-info {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Penalty Options */
.penalty-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: #d6336c;
    background: #f8f9ff;
}

.radio-option.selected {
    border-color: #d6336c;
    background: #eff6ff;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #d6336c;
}

.radio-option span {
    flex: 1;
    font-size: 0.95rem;
    color: #374151;
}

/* Custom Penalty Input */
.custom-penalty-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-left: 2rem;
}

.custom-penalty-input input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

.custom-penalty-input input:focus {
    outline: none;
    border-color: #d6336c;
}

.custom-penalty-input span {
    color: #6b7280;
    font-weight: 500;
}

/* Penalty Preview */
.penalty-preview {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.preview-row.penalty span:last-child {
    color: #dc2626;
    font-weight: 600;
}

.preview-row.refund span:last-child {
    color: #3d7a6a;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Cancel Modal Textarea */
#cancel-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
}

#cancel-form textarea:focus {
    outline: none;
    border-color: #d6336c;
}

/* Responsive Calculator */
@media (max-width: 768px) {
    .calc-nap-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .calc-nap-input {
        width: 100%;
        justify-content: flex-end;
    }

    .calc-dej-formula {
        flex-direction: column;
    }

    .calc-dej-operator {
        transform: rotate(90deg);
    }

    .calc-macros-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   AVAILABILITY TAB STYLES
   ============================================ */

.availability-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.availability-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Calendar Section */
.availability-calendar-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.availability-calendar-section h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e6ed;
}

.availability-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.avail-month-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avail-nav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e6ed;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #d6336c;
    font-size: 1.25rem;
}

.avail-nav-btn:hover {
    background: #f5f7fa;
    border-color: #d6336c;
}

.avail-current-month {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    min-width: 150px;
    text-align: center;
}

/* Calendar Grid */
.avail-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.avail-day-header {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.avail-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

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

.avail-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    background: #f8f9fa;
}

.avail-day:hover:not(.avail-day-empty):not(.avail-day-past) {
    border-color: #d6336c;
    background: #eff6ff;
}

.avail-day-empty {
    background: transparent;
    cursor: default;
}

.avail-day-past {
    color: #bdc3c7;
    cursor: not-allowed;
}

.avail-day-today {
    border-color: #d6336c;
    font-weight: 600;
}

.avail-day-unavailable {
    background: #fef2f2;
    color: #dc2626;
    position: relative;
}

.avail-day-unavailable::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
}

.avail-day-partial {
    background: #fffbeb;
    color: #d97706;
    position: relative;
}

.avail-day-partial::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #d97706;
    border-radius: 50%;
}

.avail-day-preview {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-color: #f59e0b;
    position: relative;
}

.avail-day-preview::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #f59e0b;
    border-radius: 50%;
}

.avail-day-selected {
    background: #d6336c;
    color: white;
    border-color: #d6336c;
}

.avail-day-selected::after {
    background: white;
}

/* Legend */
.avail-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e6ed;
}

.avail-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #7f8c8d;
}

.avail-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.avail-dot-available {
    background: #ffffff;
    border: 2px solid #4d8b7a;
}

.avail-dot-unavailable,
.avail-legend-dot.unavailable {
    background: #dc2626;
}

.avail-dot-partial,
.avail-legend-dot.partial {
    background: #d97706;
}

.avail-dot-preview {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
}

.avail-dot-recurrence-selected {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border: 1px solid #8b5cf6;
}

/* Date belonging to selected recurrence */
.avail-day-recurrence-selected {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #6d28d9;
    border-color: #8b5cf6;
    position: relative;
}

.avail-day-recurrence-selected::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #8b5cf6;
    border-radius: 50%;
}

/* Form Section */
.availability-form-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.availability-form-section h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e6ed;
}

.avail-form-group {
    margin-bottom: 1.25rem;
}

.avail-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34495e;
    font-weight: 500;
    font-size: 0.9rem;
}

.avail-form-group input[type="date"],
.avail-form-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.avail-form-group input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

/* Type Options */
.avail-type-options {
    display: flex;
    gap: 1rem;
}

.avail-radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.avail-radio-option:hover {
    border-color: #d6336c;
    background: #f8f9ff;
}

.avail-radio-option.selected {
    border-color: #d6336c;
    background: #eff6ff;
}

.avail-radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #d6336c;
}

.avail-radio-option span {
    font-size: 0.95rem;
    color: #374151;
}

/* Time Fields - display controlled by JS */
.avail-time-fields {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.avail-time-select {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #374151;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M2.22 4.47a.75.75 0 0 1 1.06 0L6 7.19l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L2.22 5.53a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.avail-time-select:hover {
    border-color: #d6336c;
    background-color: #f8f9ff;
}

.avail-time-select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
    background-color: white;
}

.avail-time-select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e0e6ed;
}

.avail-time-select:disabled:hover {
    background-color: #f3f4f6;
    border-color: #e0e6ed;
}

/* Mode Toggle */
.avail-mode-toggle {
    display: flex;
    gap: 0.75rem;
}

.avail-mode-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.avail-mode-option:hover {
    border-color: #d6336c;
    background: #f8f9ff;
}

.avail-mode-option.selected {
    border-color: #d6336c;
    background: #eff6ff;
}

.avail-mode-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #d6336c;
}

.avail-mode-label {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

/* Recurrence Config */
.recurrence-config {
    margin-bottom: 1rem;
}

.recurrence-config label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 500;
}

.weekday-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.weekday-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.weekday-checkbox:hover {
    border-color: #d6336c;
    background: #f8f9ff;
}

.weekday-checkbox:has(input:checked) {
    border-color: #d6336c;
    background: #eff6ff;
}

.weekday-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #d6336c;
}

.weekday-checkbox span {
    font-size: 0.85rem;
    color: #374151;
    font-weight: 500;
    margin-left: 2px;
}

.inline-selects {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.inline-selects .avail-time-select {
    width: auto;
    min-width: 100px;
}

.inline-label {
    font-size: 0.9rem;
    color: #6b7280;
}

.small-input {
    width: 60px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
}

.small-input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

/* Date Range */
.recurrence-date-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.required-star {
    color: #dc2626;
}

/* Preview */
.recurrence-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.preview-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.preview-count {
    font-size: 0.85rem;
    color: #d6336c;
    font-weight: 500;
    background: #eff6ff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.preview-dates-list {
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.preview-placeholder {
    color: #9ca3af;
    font-size: 0.85rem;
    font-style: italic;
}

.preview-date-item {
    font-size: 0.8rem;
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #4b5563;
}

/* Recurrence Groups in List */
.avail-group {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    grid-column: 1 / -1;
    transition: all 0.2s;
}

/* Selected recurrence group */
.avail-group-selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.avail-group-selected .avail-group-header {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.avail-group-selected .avail-group-header:hover {
    background: linear-gradient(135deg, #e4e0f9 0%, #d4cef3 100%);
}

.avail-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%);
    cursor: pointer;
    transition: background 0.2s;
}

.avail-group-header:hover {
    background: linear-gradient(135deg, #e8eeff 0%, #f5eaff 100%);
}

.avail-group-icon {
    font-size: 1.2rem;
}

.avail-group-info {
    flex: 1;
    min-width: 0;
}

.avail-group-title {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
    display: block;
}

.avail-group-meta {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.avail-group-period {
    font-size: 0.75rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.avail-group-reason {
    font-size: 0.8rem;
    color: #4b5563;
    font-style: italic;
    margin-top: 0.25rem;
    padding-left: 1.25rem;
}

.avail-group-delete {
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.avail-group-delete:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.avail-group-chevron {
    color: #9ca3af;
    transition: transform 0.2s;
}

.avail-group.expanded .avail-group-chevron {
    transform: rotate(180deg);
}

.avail-group-occurrences {
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem;
    background: #fafafa;
    max-height: 200px;
    overflow-y: auto;
}

.avail-group-occurrences .unavailability-list-item {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

/* Section title */
.avail-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    grid-column: 1 / -1;
}

.avail-section-title:first-child {
    margin-top: 0;
}

/* Group icon rotation */
.avail-group-icon {
    display: inline-flex;
    transition: transform 0.2s;
}

.avail-group.expanded .avail-group-icon {
    transform: rotate(90deg);
}

/* Group badge and time */
.avail-group-badge {
    display: inline-block;
    background: #d6336c;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-right: 0.5rem;
}

.avail-group-time {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Group delete button */
.avail-group-delete-btn {
    padding: 0.4rem;
    background: transparent;
    color: #9ca3af;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avail-group-delete-btn:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Occurrence items */
.avail-occurrence-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.avail-occurrence-item:hover {
    background: #f3f4f6;
}

.avail-occurrence-date {
    font-weight: 500;
    color: #374151;
}

.avail-occurrence-reason {
    color: #9ca3af;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avail-occurrence-more {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

/* Add Button */
.avail-add-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.avail-add-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 78, 138, 0.4);
}

.avail-add-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* List Section */
.availability-list-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    grid-column: 1 / -1;
}

.availability-list-section h4 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e0e6ed;
}

/* Month filter for unavailabilities */
.avail-month-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.avail-month-filter label {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.avail-month-filter select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 0.75rem center;
    min-width: 180px;
    transition: all 0.2s;
}

.avail-month-filter select:hover {
    border-color: #6366f1;
}

.avail-month-filter select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.unavail-empty-month {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-style: italic;
}

/* Unavailability List - Vertical Layout */
.unavailability-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.unavailability-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 1rem;
    background: #fef2f2;
    border-radius: 8px;
    border-left: 3px solid #dc2626;
    transition: all 0.2s;
}

.unavailability-list-item:hover {
    background: #fee2e2;
}

/* Partial unavailability (time slot) - orange like calendar */
.unavailability-list-item-partial {
    background: #fffbeb;
    border-left-color: #d97706;
}

.unavailability-list-item-partial:hover {
    background: #fef3c7;
}

.unavail-item-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1;
}

.unavail-item-date {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    min-width: 100px;
}

.unavail-item-time {
    font-size: 0.85rem;
    color: #d6336c;
    min-width: 120px;
}

.unavail-item-reason {
    font-size: 0.85rem;
    color: #7f8c8d;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.unavail-delete-btn {
    width: 26px;
    height: 26px;
    border: 1.5px solid #dc2626;
    background: white;
    border-radius: 5px;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.unavail-delete-btn:hover {
    background: #dc2626;
    color: white;
}

.unavailability-empty {
    text-align: center;
    padding: 1.5rem;
    color: #7f8c8d;
    font-style: italic;
}

/* Unavailability Pagination */
.unavail-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e6ed;
}

.unavail-pagination-info {
    font-size: 0.8rem;
    color: #7f8c8d;
}

.unavail-pagination-info-single {
    text-align: center;
    padding: 0.5rem;
    color: #7f8c8d;
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive Availability */
@media (max-width: 992px) {
    .availability-layout {
        grid-template-columns: 1fr;
    }

    .availability-list-section {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .unavail-item-info {
        flex-wrap: wrap;
        gap: 0.25rem 1rem;
    }

    .unavail-item-date {
        min-width: auto;
    }

    .unavail-item-time {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .avail-type-options {
        flex-direction: column;
    }

    .avail-time-fields {
        grid-template-columns: 1fr;
    }

    .avail-legend {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Selected Dates Container (Multi-select) */
.avail-selected-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    min-height: 48px;
    align-items: center;
}

.avail-no-selection {
    color: #94a3b8;
    font-size: 0.875rem;
    font-style: italic;
}

.avail-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: #d6336c;
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.avail-date-chip:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

.avail-date-chip .remove {
    font-weight: bold;
    font-size: 1rem;
    opacity: 0.8;
    margin-left: 0.15rem;
}

.avail-date-chip:hover .remove {
    opacity: 1;
}

/* =====================================================
   REVIEWS MANAGEMENT SECTION
   ===================================================== */

/* Reviews KPI Cards */
.reviews-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reviews-kpi-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.reviews-kpi-card.pending {
    border-left: 4px solid #f59e0b;
}

.reviews-kpi-card.approved {
    border-left: 4px solid #3b82f6;
}

.reviews-kpi-card.published {
    border-left: 4px solid #4d8b7a;
}

.reviews-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.reviews-kpi-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

/* Reviews Filter Buttons */
.reviews-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #d6336c;
    color: #d6336c;
}

.filter-btn.active {
    background: #d6336c;
    border-color: #d6336c;
    color: white;
}

.filter-btn.filter-pending.active,
.filter-btn.filter-approved.active,
.filter-btn.filter-published.active {
    background: #d6336c;
    border-color: #d6336c;
}

/* Reviews Grid - 2x2 */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Review Card - style admin avec lisere rose pale */
.review-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #e8b4c8;
    transition: all 0.3s;
}

.review-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.review-card.review-pending,
.review-card.review-approved {
    border-left-color: #e8b4c8;
}

.review-card.review-published {
    border-left-color: #e8b4c8;
}

/* Review Header */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-rating {
    font-size: 1.25rem;
    color: #e8b4c8;
    letter-spacing: 2px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-warning {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-success {
    background: #fce7f3;
    color: #be185d;
}

/* Review Content */
.review-content {
    margin-bottom: 1rem;
}

.review-message {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    font-style: italic;
}

/* Review Meta */
.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.review-author {
    font-weight: 600;
    color: #2c3e50;
}

.review-context {
    background: #f3f4f6;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.review-date {
    margin-left: auto;
}

/* Review Actions */
.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.review-actions .btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-approve {
    background: #f5f3ff;
    border-color: #d6336c;
    color: #d6336c;
}

.btn-approve:hover {
    background: #d6336c;
    color: white;
}

.btn-publish {
    background: #f5f3ff;
    border-color: #d6336c;
    color: #d6336c;
}

.btn-publish:hover {
    background: #d6336c;
    color: white;
}

.btn-unpublish {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #6b7280;
}

.btn-unpublish:hover {
    background: #6b7280;
    color: white;
}

.btn-delete {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}

/* Reviews Pagination */
.reviews-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.reviews-pagination .pagination-info {
    font-size: 0.875rem;
    color: #718096;
}

/* Reviews Empty State */
#reviews-list .empty-state {
    text-align: center;
    padding: 3rem;
    color: #718096;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive Reviews */
@media (max-width: 768px) {
    .reviews-kpi-grid {
        grid-template-columns: 1fr;
    }

    .review-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .review-date {
        margin-left: 0;
    }

    .review-actions {
        flex-direction: column;
    }

    .review-actions .btn-action {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   DAILY NUTRITIONAL TRACKING STYLES
   ============================================ */

/* IMC Container - affiché dans Etape 1 après MB */
.calc-imc-container {
    margin-top: 0;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d6336c;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* IMC Section */
.calc-imc-section {
    margin-bottom: 0;
}

.calc-imc-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calc-imc-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calc-imc-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d6336c;
}

.calc-imc-badge {
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.calc-imc-badge.imc-insuffisance {
    background: #fbbf24;
    color: #78350f;
}

.calc-imc-badge.imc-normal {
    background: #4d8b7a;
    color: white;
}

.calc-imc-badge.imc-surpoids {
    background: #f59e0b;
    color: white;
}

.calc-imc-badge.imc-obesite-1 {
    background: #ef4444;
    color: white;
}

.calc-imc-badge.imc-obesite-2 {
    background: #dc2626;
    color: white;
}

.calc-imc-badge.imc-obesite-3 {
    background: #991b1b;
    color: white;
}

/* IMC Courbe Enfant Section */
.imc-courbe-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.imc-courbe-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Date Selector Section */
.daily-tracking-date-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.daily-tracking-date-section label {
    font-weight: 600;
    color: #374151;
}

.daily-tracking-date-input {
    padding: 0.625rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.daily-tracking-date-input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

.date-entry-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #f5e4e9;
    border-radius: 8px;
    border: 1px solid #ee91a6;
    width: 100%;
    box-sizing: border-box;
}

.history-selector-wrapper label {
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
}

.history-date-select {
    padding: 0.75rem 1.25rem;
    border: 2px solid #ee91a6;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    color: #374151;
    cursor: pointer;
    min-width: 420px;
    flex: 1;
    width: auto;
}

.history-date-select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.2);
}

.history-date-select option {
    padding: 0.5rem;
}

.daily-tracking-status {
    font-size: 0.875rem;
    font-style: italic;
    color: #6b7280;
}

.daily-tracking-status.status-loaded {
    color: #4d8b7a;
    font-weight: 500;
}

.daily-tracking-status.status-new {
    color: #f59e0b;
}

/* Row container for dropdown + button */
.history-selector-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

/* Bouton Nouvelle Fiche */
.new-record-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    margin: 0 0.5rem;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

.new-record-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.4);
}

.new-record-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.new-record-btn svg {
    flex-shrink: 0;
}

/* Food Composition Table */
.food-table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.food-composition-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    min-width: 900px;
}

.food-composition-table thead {
    background: #f3f4f6;
}

.food-composition-table th {
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.food-composition-table th.food-name-col {
    text-align: left;
    min-width: 180px;
}

.food-composition-table th.food-qty-col {
    min-width: 80px;
}

.food-composition-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    color: #4b5563;
}

.food-composition-table tbody tr:hover {
    background: #f9fafb;
}

.food-composition-table tbody tr td:first-child {
    text-align: left;
    font-weight: 500;
    color: #374151;
}

/* Food row highlight (for legumes, fruits, produits sucres) */
.food-row-highlight {
    background: #fffbeb;
}

.food-row-highlight:hover {
    background: #fef3c7 !important;
}

/* Food quantity input */
.food-qty-input {
    width: 70px;
    padding: 0.375rem 0.5rem;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.food-qty-input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 2px rgba(233, 78, 138, 0.15);
}

.food-qty-input::-webkit-inner-spin-button,
.food-qty-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* Calculated cells */
.food-calc {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 0.8rem;
}

/* Footer rows */
.food-composition-table tfoot tr {
    background: #f3f4f6;
}

.food-totals-row {
    background: #e5e7eb !important;
    font-weight: 600;
}

.food-totals-row td {
    border-top: 2px solid #9ca3af;
    color: #1f2937;
}

.food-energy-row {
    background: #dbeafe !important;
}

.food-energy-row td {
    font-weight: 600;
    color: #1e40af;
}

.food-recommended-row {
    font-size: 0.8rem;
    color: #6b7280;
}

.food-recommended-row td {
    font-style: italic;
}

.food-diff-row {
    background: #fef3c7 !important;
}

.food-diff-row td {
    font-weight: 600;
}

/* Macro totals validation */
.food-macro-total {
    font-weight: 600;
}

.food-macro-total.over-limit {
    color: #dc2626 !important;
    background: #fef2f2;
}

.food-macro-total.under-limit {
    color: #4d8b7a !important;
}

/* Difference cells */
.food-diff-cell {
    font-weight: 600;
}

.food-diff-cell.diff-over {
    color: #dc2626;
    background: #fef2f2;
}

.food-diff-cell.diff-ok {
    color: #4d8b7a;
    background: #f0fdf4;
}

/* Generic over/under limit styles for ecart cells */
.over-limit {
    color: #dc2626 !important;
    background: #fef2f2;
    font-weight: 600;
}

.under-limit {
    color: #4d8b7a !important;
    background: #f0fdf4;
    font-weight: 600;
}

/* In-range / Out-of-range for macro totals */
.in-range {
    color: #4d8b7a !important;
    background: #f0fdf4;
    font-weight: 700;
}

.out-of-range {
    color: #dc2626 !important;
    background: #fef2f2;
    font-weight: 700;
}

/* Sugar Alert */
.food-sugar-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.food-sugar-alert-icon {
    width: 28px;
    height: 28px;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.food-sugar-alert-text {
    color: #991b1b;
    font-size: 0.9rem;
}

.food-sugar-alert-text strong {
    font-weight: 600;
}

/* TRANSMISSION Section */
.transmission-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.transmission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.transmission-section h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transmission-section h5 i {
    color: #d6336c;
}

.btn-add-transmission {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-transmission:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.3);
}

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

.transmission-textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 180px;
    transition: all 0.3s;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.6;
    background: #fafbfc;
}

.transmission-textarea:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
    background: white;
}

.transmission-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
    font-family: inherit;
}

/* Daily Tracking Actions */
.daily-tracking-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.daily-save-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    width: auto;
}

.daily-save-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Snackbar Notification */
.snackbar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(120%);
    transition: transform 0.3s ease, visibility 0.3s ease;
    visibility: hidden;
}

.snackbar.show {
    transform: translateX(0);
    visibility: visible;
}

.snackbar.success {
    background: #4d8b7a;
    color: white;
}

.snackbar.error {
    background: #ef4444;
    color: white;
}

.snackbar-icon {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.snackbar-text {
    white-space: nowrap;
}

/* Charts Section */
.daily-charts-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.daily-charts-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.daily-charts-section h5::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    border-radius: 2px;
}

.daily-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.daily-chart-container {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.daily-chart-container h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.daily-chart-container canvas {
    max-height: 280px;
}

/* Responsive Daily Tracking */
@media (max-width: 1024px) {
    .daily-charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .daily-tracking-date-section {
        flex-direction: column;
        align-items: stretch;
    }

    .daily-tracking-date-section label {
        margin-bottom: 0.25rem;
    }

    .food-composition-table {
        font-size: 0.75rem;
    }

    .food-qty-input {
        width: 60px;
        padding: 0.25rem;
    }

    .calc-results-row {
        grid-template-columns: 1fr;
    }

    .calc-imc-card {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .calc-imc-badge {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .daily-charts-grid {
        gap: 1rem;
    }

    .daily-chart-container {
        padding: 1rem;
    }

    .daily-chart-container canvas {
        max-height: 220px;
    }
}

/* ============================================
   APPOINTMENTS SEARCH AND SORT STYLES
   ============================================ */

/* Search Box */
.appointments-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.appointments-filters .month-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-filter-right {
    margin-left: auto;
}

/* Status filter */
.status-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-filter label {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.status-filter select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 0.5rem center;
}

.status-filter select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

/* Toggle switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 36px;
    height: 20px;
    background-color: #d1d5db;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #d6336c;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.filter-label {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' 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 0.5rem center;
}

.filter-select:hover {
    border-color: #6366f1;
}

.filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.filter-count {
    font-size: 0.85rem;
    color: #6b7280;
    white-space: nowrap;
}

/* Client cell with name hover */
.client-cell {
    padding: 0.5rem 0;
}

.client-name {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1.3;
}

.client-name:hover {
    color: #4f46e5;
}

.client-firstname {
    font-weight: 400;
    font-size: 0.9rem;
}

.client-lastname {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Date cell with date/time stacked */
.date-cell {
    padding: 0.5rem 0;
}

.date-cell .date-value,
.date-cell .time-value {
    display: block;
    line-height: 1.4;
}

.date-cell .date-value {
    font-weight: 500;
    font-size: 0.9rem;
}

.date-cell .time-value {
    font-weight: 400;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Client info tooltip */
.client-tooltip {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: tooltipFadeIn 0.15s ease-out;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s;
}

.tooltip-link:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.tooltip-link svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Sortable Table Headers */
.appointments-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.appointments-table th.sortable:hover {
    background-color: #e8ecf1;
}

/* Sort Icon */
.sort-icon {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.sort-icon.active {
    opacity: 1;
    color: #d6336c;
}

.appointments-table th.sortable:hover .sort-icon {
    opacity: 0.7;
}

/* =====================================================
   KEBAB MENU - Actions dropdown
   ===================================================== */

.kebab-menu-container {
    position: relative;
    display: inline-flex;
    justify-content: center;
}

.kebab-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
    background: #fff;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s;
}

.kebab-menu-btn:hover {
    background: #f5f7fa;
    border-color: #d6336c;
    color: #d6336c;
}

.kebab-menu-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(233, 78, 138, 0.2);
}

.kebab-menu-btn.disabled,
.kebab-menu-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.kebab-menu-dropdown {
    position: fixed;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.kebab-menu-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Position variants to avoid viewport overflow */
.kebab-menu-dropdown.position-top {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

.kebab-menu-dropdown.position-left {
    right: auto;
    left: 0;
}

.kebab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #2c3e50;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s;
}

.kebab-menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.kebab-menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.kebab-menu-item:only-child {
    border-radius: 8px;
}

.kebab-menu-item:hover:not(:disabled) {
    background: #f5f7fa;
}

.kebab-menu-item:disabled,
.kebab-menu-item.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
}

.kebab-menu-item:disabled svg,
.kebab-menu-item.disabled svg {
    opacity: 0.5;
}

.kebab-menu-item svg {
    flex-shrink: 0;
    color: #7f8c8d;
}

.kebab-menu-item:hover:not(:disabled) svg {
    color: #d6336c;
}

/* Separator */
.kebab-menu-separator {
    height: 1px;
    background: #e0e6ed;
    margin: 4px 0;
}

/* Special item colors */
.kebab-menu-item-capture {
    color: #4d8b7a;
}

.kebab-menu-item-capture svg {
    color: #4d8b7a;
}

.kebab-menu-item-capture:hover:not(:disabled) {
    background: #e8f8f0;
}

.kebab-menu-item-noshow {
    color: #e67e22;
}

.kebab-menu-item-noshow svg {
    color: #e67e22;
}

.kebab-menu-item-noshow:hover:not(:disabled) {
    background: #fdf3e8;
}

/* Actions cell alignment */
.actions-cell {
    text-align: center;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .appointments-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: none;
    }

    .kebab-menu-dropdown {
        min-width: 160px;
    }
}

/* ============================================
   INVOICE STYLES
   ============================================ */

/* Invoice menu items */
.kebab-menu-item-invoice {
    color: #3b82f6;
}

.kebab-menu-item-invoice svg {
    color: #3b82f6;
}

.kebab-menu-item-invoice:hover:not(:disabled) {
    background: #eff6ff;
}

.kebab-menu-item-email {
    color: #3d7a6a;
}

.kebab-menu-item-email svg {
    color: #3d7a6a;
}

.kebab-menu-item-email:hover:not(:disabled) {
    background: #ecfdf5;
}

/* Invoice Config Form */
.invoice-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.invoice-config-grid .form-group-full {
    grid-column: 1 / -1;
}

.invoice-config-grid textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s;
}

.invoice-config-grid textarea:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* Legal info section */
.invoice-legal-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.invoice-legal-info p {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.invoice-legal-info p:last-child {
    margin-bottom: 0;
}

.invoice-legal-info strong {
    color: #1e293b;
}

/* Responsive invoice config */
@media (max-width: 768px) {
    .invoice-config-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CONFIGURATION - Sous-onglets
   ============================================ */

/* Container des sous-onglets */
.config-sub-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 0;
}

/* Boutons des sous-onglets */
.config-sub-tab {
    padding: 0.75rem 1.25rem;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
    position: relative;
    font-weight: 500;
}

.config-sub-tab:hover {
    color: #d6336c;
    background: #f5f7fa;
}

.config-sub-tab.active {
    color: #d6336c;
    font-weight: 600;
    background: #fff;
}

.config-sub-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #d6336c;
}

/* Contenu des sous-onglets */
.config-subtab-content {
    display: none;
}

.config-subtab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grille des formulaires config */
.config-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Toggle inline pour config */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.toggle-label input {
    display: none;
}

.toggle-slider-inline {
    display: inline-block;
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 26px;
    background: #9ca3af;
    border-radius: 13px;
    transition: background 0.3s;
    flex-shrink: 0;
    vertical-align: middle;
}

.toggle-slider-inline::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-label input:checked + .toggle-slider-inline {
    background: #d6336c;
}

.toggle-label input:checked + .toggle-slider-inline::before {
    transform: translateX(22px);
}

.toggle-text {
    flex: 1;
    line-height: 1.4;
}

/* Form elements pour config */
.form-select,
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background: #fff;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

/* Notifications config layout */
.notif-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item-group {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    border: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.notif-sub-option {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notif-sub-option label {
    font-size: 0.9rem;
    color: #4b5563;
    white-space: nowrap;
}

.notif-hours-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-hours-input .form-input {
    width: 80px;
    text-align: center;
}

.notif-hours-suffix {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Responsive config */
@media (max-width: 768px) {
    .config-form-grid {
        grid-template-columns: 1fr;
    }

    .config-sub-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .config-sub-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .notif-sub-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================
   LIVRE DES RECETTES (Comptabilite)
   ============================================ */

/* Tab subtitle */
.tab-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Threshold alerts */
.threshold-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.threshold-alert.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
}

.threshold-alert.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    color: #991b1b;
}

.threshold-alert.exceeded {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: white;
    font-weight: 600;
}

.threshold-alert strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Accounting filters */
.accounting-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.accounting-filters .year-filter,
.accounting-filters .month-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accounting-filters label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.accounting-filters select {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.accounting-filters select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.1);
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #e94e8a 0%, #d13e74 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.export-btn:hover {
    background: linear-gradient(135deg, #d13e74 0%, #b8285a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.3);
}

.export-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.export-btn svg {
    flex-shrink: 0;
}

/* Accounting summary cards */
.accounting-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.accounting-summary .summary-card {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid #e5e7eb;
}

.accounting-summary .summary-label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.accounting-summary .summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.accounting-summary .summary-value.warning {
    color: #f59e0b;
}

.accounting-summary .summary-value.danger {
    color: #ef4444;
}

.accounting-summary .summary-value.exceeded {
    color: #991b1b;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Accounting table */
.accounting-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.accounting-table th {
    background: #f8fafc;
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.accounting-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
}

.accounting-table tbody tr:hover {
    background: #f8fafc;
}

.accounting-table td.amount {
    text-align: right;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-weight: 500;
    color: #3d7a6a;
}

.accounting-table td.loading,
.accounting-table td.empty-message,
.accounting-table td.error-message {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.accounting-table td.error-message {
    color: #ef4444;
}

/* Monthly totals in footer */
.accounting-table tfoot tr.monthly-total {
    background: #f1f5f9;
}

.accounting-table tfoot tr.monthly-total td {
    border-bottom: 1px solid #cbd5e1;
    font-weight: 500;
}

.accounting-table tfoot tr.grand-total {
    background: #64748b;
}

.accounting-table tfoot tr.grand-total td {
    color: white;
    border-bottom: none;
}

.accounting-table tfoot tr.grand-total td.amount {
    color: #e5e7eb;
}

.accounting-table tfoot .total-label {
    text-align: right;
    padding-right: 1rem;
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Small spinner for buttons */
.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive accounting */
@media (max-width: 768px) {
    .accounting-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .accounting-filters .year-filter,
    .accounting-filters .month-filter {
        width: 100%;
    }

    .accounting-filters select {
        flex: 1;
    }

    .export-btn {
        margin-left: 0;
        justify-content: center;
    }

    .accounting-summary {
        grid-template-columns: 1fr;
    }

    .accounting-table {
        font-size: 0.85rem;
    }

    .accounting-table th,
    .accounting-table td {
        padding: 0.5rem 0.75rem;
    }
}

/* ============================================
   EXPENSES SECTION STYLES
   ============================================ */

/* Section header with button */
.expenses-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.expenses-section .section-header h4 {
    margin: 0;
    white-space: nowrap;
}

/* Add expense button - red style (expense = red) */
#add-expense-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(to bottom right, #dd3237, #d32d33);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#add-expense-btn:hover {
    background: linear-gradient(to bottom right, #c92b30, #bf2629);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 50, 55, 0.3);
}

#add-expense-btn svg {
    flex-shrink: 0;
}

/* Expenses table */
.expenses-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.expenses-table th {
    background: #f8fafc;
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.expenses-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.expenses-table tbody tr:hover {
    background: #fffbeb;
}

.expenses-table td.amount.expense-amount {
    text-align: right;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-weight: 500;
    color: #dc2626;
}

.expenses-table td.loading,
.expenses-table td.empty-message,
.expenses-table td.error-message {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.expenses-table td.error-message {
    color: #ef4444;
}

/* Expenses total in footer */
.expenses-table tfoot tr.grand-total {
    background: #64748b;
}

.expenses-table tfoot tr.grand-total td {
    color: white;
    border-bottom: none;
    padding: 0.875rem 1rem;
}

.expenses-table tfoot tr.grand-total td.amount.expense-amount {
    color: #e5e7eb;
}

.expenses-table tfoot .total-label {
    text-align: right;
    padding-right: 1rem;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-badge.category-autre { background: #e5e7eb; color: #374151; }
.category-badge.category-materiel { background: #dbeafe; color: #1d4ed8; }
.category-badge.category-fournitures { background: #e0e7ff; color: #4338ca; }
.category-badge.category-logiciel { background: #fce7f3; color: #be185d; }
.category-badge.category-formation { background: #d1fae5; color: #047857; }
.category-badge.category-transport { background: #fef3c7; color: #b45309; }
.category-badge.category-communication { background: #fee2e2; color: #b91c1c; }
.category-badge.category-assurance { background: #f3e8ff; color: #7c3aed; }
.category-badge.category-cotisation { background: #ccfbf1; color: #0f766e; }
.category-badge.category-telephone { background: #cffafe; color: #0891b2; }

/* Action buttons in table */
.actions-cell {
    white-space: nowrap;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #f3f4f6;
}

.edit-expense-btn:hover {
    color: #3b82f6;
    background: #eff6ff;
}

.delete-expense-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Summary card colors */
.accounting-summary .summary-value.income {
    color: #3d7a6a;
}

.accounting-summary .summary-value.expense {
    color: #dc2626;
}

.accounting-summary .summary-value.profit {
    color: #1d4ed8;
}

.accounting-summary .summary-value.profit.positive {
    color: #3d7a6a;
}

.accounting-summary .summary-value.profit.negative {
    color: #dc2626;
}

/* Expense Modal */
#expense-modal {
    justify-content: center;
    align-items: center;
}

.expense-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 650px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

.expense-modal-content .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.expense-modal-content .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.expense-modal-content .form-group.full-width {
    grid-column: 1 / -1;
}

.expense-modal-content .form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.expense-modal-content .form-group input,
.expense-modal-content .form-group textarea {
    padding: 0.625rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.expense-modal-content .form-group select {
    padding: 0.625rem 2.5rem 0.625rem 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.expense-modal-content .form-group select:hover {
    border-color: #d6336c;
    background-color: #f8f9ff;
}

.expense-modal-content .form-group input:focus,
.expense-modal-content .form-group select:focus,
.expense-modal-content .form-group textarea:focus {
    outline: none;
    border-color: #d6336c;
}

.expense-modal-content .form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.expense-modal-content .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

#save-expense-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#save-expense-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Expense buttons group */
.expense-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

#export-expenses-pdf-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #e94e8a 0%, #d13e74 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#export-expenses-pdf-btn:hover {
    background: linear-gradient(135deg, #d13e74 0%, #b8285a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.3);
}

/* Responsive expenses */
@media (max-width: 768px) {
    .expenses-section .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .expenses-section .section-header h4 {
        text-align: center;
    }

    .expenses-table {
        font-size: 0.85rem;
    }

    .expenses-table th,
    .expenses-table td {
        padding: 0.5rem 0.75rem;
    }

    .expense-modal-content .form-grid {
        grid-template-columns: 1fr;
    }

    .expense-modal-content .form-group.full-width {
        grid-column: 1;
    }
}

/* ============================================
   PATIENT SHEET TYPE - ADULTE/ENFANT STYLES
   ============================================ */

/* Sheet Type Selector Toggle */
.sheet-type-selector {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: #f3f4f6;
    border-radius: 8px;
    width: fit-content;
}

.sheet-type-btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: #6b7280;
}

.sheet-type-btn:hover {
    color: #374151;
}

.sheet-type-btn.active {
    background: #d6336c;
    color: white;
    box-shadow: 0 2px 4px rgba(233, 78, 138, 0.3);
}

.sheet-type-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.375rem 0.75rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #92400e;
}

.sheet-type-hint.hidden {
    display: none;
}

/* Sheet Type Indicator (automatique selon age) */
.sheet-type-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.sheet-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sheet-type-badge.sheet-type-adulte {
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(233, 78, 138, 0.3);
}

.sheet-type-badge.sheet-type-enfant {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.sheet-type-badge i {
    font-size: 0.9rem;
}

/* Adulte/Enfant Only Classes */
.adulte-only,
.enfant-only {
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* NAP Dual Container (Adulte) */
.nap-dual-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.nap-section {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.3s ease;
}

.nap-section.nap-disabled {
    opacity: 0.5;
    background: #f9fafb;
}

.nap-section.nap-disabled .calc-nap-row input {
    pointer-events: none;
}

.nap-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.nap-section-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d6336c;
    cursor: pointer;
}

.nap-section-header label {
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.nap-section .calc-nap-row {
    margin-bottom: 0.5rem;
}

.nap-section .calc-nap-row:last-of-type {
    margin-bottom: 0;
}

/* NAP Pathologie Section */
.nap-pathologie-section {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
}

.nap-pathologie-section label {
    display: block;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.nap-pathologie-section select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #fcd34d;
    border-radius: 8px;
    background: white;
    font-size: 0.9375rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f59e0b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.nap-pathologie-section select:hover {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.nap-pathologie-section select:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* NAP Enfant Options */
.nap-enfant-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nap-enfant-option {
    flex: 1;
    min-width: 160px;
    cursor: pointer;
}

.nap-enfant-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nap-enfant-card {
    padding: 1.25rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.nap-enfant-card:hover {
    border-color: #d6336c;
    background: #f8f7ff;
}

.nap-enfant-option input[type="radio"]:checked + .nap-enfant-card {
    border-color: #d6336c;
    background: linear-gradient(135deg, #d6336c 0%, #b8285a 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(233, 78, 138, 0.3);
}

.nap-enfant-card i {
    font-size: 1.75rem;
    color: #d6336c;
    margin-bottom: 0.25rem;
}

.nap-enfant-option input[type="radio"]:checked + .nap-enfant-card i {
    color: white;
}

.nap-enfant-label {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #1f2937;
}

.nap-enfant-option input[type="radio"]:checked + .nap-enfant-card .nap-enfant-label {
    color: white;
}

.nap-enfant-value {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #d6336c;
}

.nap-enfant-option input[type="radio"]:checked + .nap-enfant-card .nap-enfant-value {
    color: rgba(255, 255, 255, 0.9);
}

.nap-enfant-desc {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.nap-enfant-option input[type="radio"]:checked + .nap-enfant-card .nap-enfant-desc {
    color: rgba(255, 255, 255, 0.8);
}

/* FM (Facteur Maladie) Section */
.fm-section {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #d6336c;
    border-radius: 12px;
    background: linear-gradient(135deg, #fafbff 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(233, 78, 138, 0.08);
}

.fm-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fm-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.fm-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #d6336c;
    cursor: pointer;
}

.fm-toggle span {
    font-weight: 600;
    font-size: 1rem;
    color: #374151;
    cursor: pointer;
}

.fm-toggle span i {
    color: #d6336c;
    margin-right: 0.25rem;
}

.fm-config {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.fm-type-select {
    /* Grid prend en charge la largeur */
}

.fm-type-select label,
.fm-value-input label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.fm-config select {
    width: 100%;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    background: white;
    font-size: 0.9375rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23d6336c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.fm-config select:hover {
    border-color: #d6336c;
}

.fm-config select:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.15);
}

.fm-value-input {
    /* Grid prend en charge la largeur */
}

.fm-value-input input[type="number"] {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #d6336c;
    transition: all 0.3s ease;
}

.fm-value-input input[type="number"]:hover {
    border-color: #d6336c;
}

.fm-value-input input[type="number"]:focus {
    outline: none;
    border-color: #d6336c;
    box-shadow: 0 0 0 3px rgba(233, 78, 138, 0.15);
}

.fm-range-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
    font-weight: 400;
}

/* DEJ Info Box (Enfant) */
.dej-info-enfant {
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #1e40af;
}

/* Ration Enrichie Section */
.ration-enrichie-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #4d8b7a;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ration-enrichie-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.ration-enrichie-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4d8b7a;
    cursor: pointer;
}

.ration-enrichie-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: #166534;
    cursor: pointer;
}

.ration-enrichie-label i {
    color: #4d8b7a;
}

.ration-enrichie-hint {
    font-size: 0.875rem;
    color: #6b7280;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.ration-enrichie-section:has(input:checked) {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border-color: #86efac;
}

.ration-enrichie-section:has(input:checked) .ration-enrichie-hint {
    background: #4d8b7a;
    color: white;
    border-color: #4d8b7a;
}

/* Protein Range Info (Enfant) */
.protein-range-info {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
}

.protein-range-info .label {
    font-size: 0.75rem;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.protein-range-info .value {
    font-weight: 600;
    color: #92400e;
    font-size: 0.875rem;
}

/* IMC Curve Container (Enfant) */
.imc-curve-container {
    position: relative;
    max-width: 600px;
    margin: 1rem auto;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.imc-curve-container img {
    width: 100%;
    height: auto;
    display: block;
}

.imc-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

.imc-marker svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.imc-curve-hint {
    text-align: center;
    padding: 0.5rem;
    background: #f3f4f6;
    font-size: 0.75rem;
    color: #6b7280;
}

/* IMC Display Cards */
.imc-display-adulte,
.imc-display-enfant {
    transition: opacity 0.3s ease;
}

/* Food Tracking Diff Colors */
.food-diff-ok {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.food-diff-warning {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.food-diff-under {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

/* Transmission Date Button */
.transmission-date-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transmission-date-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.transmission-date-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   RESPONSIVE - PATIENT SHEET TYPE
   ============================================ */

@media (max-width: 1024px) {
    .nap-dual-container {
        grid-template-columns: 1fr;
    }

    .fm-config {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sheet-type-selector {
        width: 100%;
        justify-content: center;
    }

    .sheet-type-btn {
        flex: 1;
        text-align: center;
    }

    .sheet-type-hint {
        display: none;
    }

    .nap-enfant-options {
        flex-direction: column;
    }

    .nap-enfant-card {
        min-width: auto;
    }

    .imc-curve-container {
        max-width: 100%;
    }
}
