/**
 * Custom Styles - Zedeca Application
 * Design System v1.3
 *
 * Ce fichier contient les styles personnalisés pour l'application
 * basés sur le design system documenté dans design-system.md
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    /* Couleurs principales */
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;

    /* Couleurs d'état */
    --success-color: #10b981;
    --danger-color: #ef4444;

    /* Couleurs de surface */
    --background: #f1f5f9;
    --surface: #ffffff;
    --border-color: #e2e8f0;

    /* Couleurs de texte */
    --text-primary: #1e293b;
    --text-secondary: #64748b;

    /* Ombres */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Border-radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;

    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.2s ease;
    --transition-medium: all 0.3s ease;
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    letter-spacing: 0.01em;
    background-color: var(--surface) !important;
    color: var(--text-primary);
}

/* ========================================
   BOUTONS
   ======================================== */

/* Bouton de base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bouton Primary */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

/* Bouton Outline Primary */
.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Bouton Danger */
.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Bouton Outline Danger */
.btn-outline-danger {
    background-color: transparent;
    color: var(--danger-color);
    border: 1.5px solid var(--danger-color);
}

.btn-outline-danger:hover:not(:disabled) {
    background-color: var(--danger-color);
    color: white;
    transform: translateY(-1px);
}

/* Bouton Success */
.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Bouton Ghost (transparent) */
.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Tailles de boutons */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* ========================================
   LAYOUT
   ======================================== */

/* Container de page */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .page-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 1rem;
    }
}

/* Header de page */
/* .page-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
} */
.page-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.page-header p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* ========================================
   TABLEAUX
   ======================================== */

/* Wrapper de tableau */
.data-table-wrapper {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Tableau */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* En-tête de tableau */
.data-table thead {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
}

.data-table thead th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

/* Corps de tableau */
.data-table tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    vertical-align: middle;
}

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

/* Hover sur les lignes */
.data-table tbody tr {
    transition: var(--transition-fast);
}

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

/* ========================================
   FORMULAIRES
   ======================================== */

/* Input de base */
.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Select input */
.select-input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
}

.select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Label */
.form-label,
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-container {
    background: var(--surface);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
}

.form-body {
    padding: 2rem;
}

.form-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--surface);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

@media (max-width: 768px) {
    .form-body {
        padding: 1.5rem;
    }

    .form-footer {
        padding: 1rem;
    }
}

/* ========================================
   CARTES
   ======================================== */

/* Carte de base */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

/* Header de carte */
.card-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 9999px;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

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

.badge-gray {
    background-color: #f3f4f6;
    color: #374151;
}

/* ========================================
   NAVIGATION & BREADCRUMB
   ======================================== */

/* === BREADCRUMB === */
.breadcrumb {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.breadcrumb-item:hover {
    color: var(--primary-color);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    margin: 0 0.5rem;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    padding: 0.625rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--background);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.page-number:hover {
    background-color: var(--background);
    color: var(--text-primary);
}

.page-number.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* ========================================
   ÉTATS DE CHARGEMENT
   ======================================== */

/* Spinner */
.spinner {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.table-spinner {
    width: 2rem;
    height: 2rem;
    margin: 0 auto;
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-in-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    margin-top: 1.5rem;
    letter-spacing: 0.01em;
}

/* Skeleton loader pour les lignes du tableau */
.skeleton-row {
    background: linear-gradient(90deg,
        #f3f4f6 0%,
        #e5e7eb 20%,
        #f3f4f6 40%,
        #f3f4f6 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: #e5e7eb;
}

.new-task-button {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.3);
    white-space: nowrap;
}

.new-task-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 64, 175, 0.4);
}

.new-task-button:active {
    transform: translateY(0);
}

.new-task-button svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.new-task-button:hover svg {
    transform: rotate(90deg) scale(1.1);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

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

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   UTILITAIRES
   ======================================== */

/* Box shadow utilities */
.boxshod {
    box-shadow: var(--shadow-md);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Border utilities */
.border {
    border: 1px solid;
}

.border-gray-100 {
    border-color: #f3f4f6;
}

/* Banner gradient */
.bannerGradient {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
}

/* Transitions */
.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Truncate text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Texte responsive */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* ========================================
   COMPOSANTS SPÉCIFIQUES
   ======================================== */

/* Filtre tabs */
.filter-tabs-wrapper {
    display: flex;
    gap: 0.25rem;
    padding: 0.375rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.filter-tab {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.filter-tab:hover {
    background-color: var(--surface);
    color: var(--text-primary);
}

.filter-tab.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Search wrapper */
.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-secondary);
    pointer-events: none;
}

input.search-input,
input[type="search"].search-input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.875rem;
    transition: var(--transition-base);
    background: var(--surface);
    width: 100%;
}

input.search-input:focus,
input[type="search"].search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 768px) {
    .filter-tabs-wrapper {
        flex-direction: column;
        width: 100%;
    }

    .filter-tab {
        width: 100%;
        text-align: center;
    }

    .pagination-wrapper {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .data-table-wrapper {
        overflow-x: auto;
    }

    .data-table {
        min-width: 800px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 640px) {
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 800px;
    }
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid;
    cursor: pointer;
    transition: var(--transition-base);
}

.alert:hover {
    opacity: 0.9;
}

.alert svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* ========================================
   ACCESS BUTTONS (Modals Permissions)
   ======================================== */

.access-btn1 {
    padding: 0.25rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
    cursor: pointer;
}

.access-btn1:hover {
    background-color: var(--background);
}

/* État sélectionné - Bleu primary */
.access-btn1.selected,
.access-btn1.bg-blue-500 {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* ========================================
   MODALS
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal[open],
.modal.active {
    display: flex;
}

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    animation: fadeIn 0.2s ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2,
.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ========================================
   DROPDOWNS
   ======================================== */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-end {
    text-align: right;
}

.dropdown-content {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 12rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.dropdown:focus-within .dropdown-content,
.dropdown-content:focus-within {
    opacity: 1;
    visibility: visible;
}

.dropdown-content .menu {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
}

.dropdown-content .menu li {
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

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

.dropdown-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   HEADER ACTIONS
   ======================================== */

.header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.header-actions-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions .btn {
        width: 100%;
    }
}

/* ========================================
   MONTHLY TABLE
   ======================================== */

.monthly-table {
    margin-top: 1.5rem;
}

.monthly-table .data-table tbody tr {
    cursor: pointer;
}

.monthly-table .data-table tbody tr:hover {
    background-color: #f0fdf4;
}

.table-summary-row {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    font-weight: 600;
}

.table-summary-row td {
    padding: 1rem 1.5rem !important;
    border-top: 2px solid var(--border-color) !important;
    border-bottom: none !important;
}

/* ========================================
   SELECT WRAPPER
   ======================================== */

.select-wrapper {
    display: inline-block;
}

.select-wrapper select {
    min-width: 150px;
}

/* ========================================
   TEXT UTILITIES
   ======================================== */

.text-muted {
    color: var(--text-secondary);
}

.text-right {
    text-align: right;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

/* ========================================
   PLAN SELECTOR COMPONENTS
   ======================================== */

/* Plan Selector Container */
.plan-selector {
    width: 100%;
}

/* Plan Cards Grid */
.plans-grid {
    display: grid;
    gap: 1.5rem;
}

/* Individual Plan Card */
.plan-card {
    position: relative;
    transition: var(--transition-base);
}

.plan-card:hover .card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Plan Card Variants */
.plan-recommended {
    border: 2px solid var(--success-color) !important;
}

.plan-current {
    border: 2px solid var(--primary-color) !important;
}

/* Plan Card Header */
.plan-card .card-header {
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

/* Plan Card on Hover */
.plan-card:hover .card-header h3 {
    color: var(--primary-color);
    transition: var(--transition-base);
}

/* Responsive Plan Grid */
@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .plan-card {
        max-width: 100%;
    }
}

/* ========================================
   CHECKOUT PAGE COMPONENTS
   ======================================== */

/* Checkout Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr 2fr;
    }
}

@media (min-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr 2fr !important;
    }
}

/* Order Summary Sidebar */
.order-summary-sidebar .card {
    position: sticky;
    top: 1.5rem;
}

/* Stripe Checkout Container */
.stripe-checkout-container {
    width: 100%;
}

.stripe-checkout {
    width: 100%;
}

/* Checkout Form Groups */
.stripe-checkout .form-group {
    margin-bottom: 1.5rem;
}

.stripe-checkout .form-group:last-child {
    margin-bottom: 0;
}

/* Card Element Wrapper */
.stripe-checkout .card {
    transition: var(--transition-base);
}

.stripe-checkout .card:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

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

    .order-summary-sidebar .card {
        position: static;
    }

    .stripe-checkout-container {
        padding: 1rem !important;
    }
}
