/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
    --bg-primary: #f8f0eb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fdfaf7;
    --primary: #1d7d26;
    --primary-light: #2ca036;
    --primary-dark: #155a1c;
    --primary-alpha: rgba(29, 125, 38, 0.1);
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --success: #059669;
    --error: #dc2626;
    --warning: #d97706;
    --border: rgba(29, 125, 38, 0.15);
    --border-light: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(29, 125, 38, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(29, 125, 38, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(29, 125, 38, 0.16),
        0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 16px 48px rgba(29, 125, 38, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Pretendard Variable", -apple-system, BlinkMacSystemFont,
        system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-md);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.logo svg {
    width: 32px;
    height: 32px;
    fill: var(--primary);
}

.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: var(--primary-alpha);
    color: var(--primary);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
}

.nav-menu {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item:hover {
    background: var(--primary-alpha);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    color: white;
    box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
    height: 70%;
}

.user-section {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.user-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role {
    font-size: 13px;
    color: var(--text-light);
}

.logout-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: #fee;
    color: #c33;
}

.logout-btn svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Sidebar Overlay for Mobile
   ============================================ */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar.open ~ .sidebar-overlay {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Mobile Header
   ============================================ */
.mobile-header {
    display: none;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    background: var(--primary-alpha);
    color: var(--primary);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.mobile-logo svg {
    width: 28px;
    height: 28px;
    fill: var(--primary);
    flex-shrink: 0;
}

/* ============================================
   Main Content Area
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    transition: margin-left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.main-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
            circle at 20% 30%,
            rgba(29, 125, 38, 0.02) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(29, 125, 38, 0.03) 0%,
            transparent 50%
        );
    pointer-events: none;
}

#pageContent {
    position: relative;
    z-index: 1;
}

/* ============================================
   Dashboard Styles
   ============================================ */
.dashboard-header {
    padding: 40px 40px 0;
    animation: fadeInDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.page-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-dark) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    padding: 40px;
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card {
    background: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--primary);
    opacity: 0.05;
    border-radius: 0 var(--radius-lg) 0 50%;
    transition: all 0.4s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.stat-card:hover::before {
    width: 140px;
    height: 140px;
    opacity: 0.08;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    padding: 0 40px 40px;
    animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

.service-card {
    background: var(--bg-secondary);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    opacity: 0;
    transition: opacity 0.4s;
}

.service-card:hover::before {
    opacity: 0.04;
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.service-card > * {
    position: relative;
    z-index: 1;
}

.service-icon-wrapper {
    width: 72px;
    height: 72px;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.service-icon-wrapper svg {
    width: 36px;
    height: 36px;
    fill: white;
}

.service-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-arrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    transition: gap 0.3s;
}

.service-card:hover .service-arrow {
    gap: 12px;
}

.service-arrow svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================================
   Common Components
   ============================================ */
.page-header {
    padding: 40px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    animation: fadeInDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    color: white;
    box-shadow: var(--shadow-sm);
}

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: #dc2626;
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: #16a34a;
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

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

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.empty-state {
    padding: 80px 40px;
    text-align: center;
    color: var(--text-light);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    fill: var(--border);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 15px;
}

/* ============================================
   Table and Card Views (Responsive)
   ============================================ */
/* Hide card view on desktop, show on mobile */
.card-view {
    display: none;
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s;
    outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px var(--primary-alpha);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s;
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #fee;
    color: #c33;
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 160px);
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(248, 240, 235, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.show {
    display: flex;
}

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

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

/* ============================================
   Table Styles
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead tr {
    border-bottom: 2px solid var(--border);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-primary);
}

.data-table th.text-right {
    text-align: right;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.data-table td {
    padding: 16px;
    color: var(--text-secondary);
}

.data-table td.text-primary {
    color: var(--text-primary);
    font-weight: 600;
}

.data-table td.text-light {
    color: var(--text-light);
    font-size: 14px;
}

.data-table td.text-right {
    text-align: right;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Modal Specific Widths */
.modal-wide {
    max-width: 800px;
}

.modal-body-scroll {
    max-height: calc(90vh - 160px);
}

/* Form Layouts */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-section {
    margin-bottom: 20px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.form-header .form-label {
    margin: 0;
}

.summary-box {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.summary-box h4 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}

.summary-row .summary-label {
    color: var(--text-secondary);
}

.summary-row .summary-value {
    font-weight: 600;
}

.summary-row.total {
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* Content Padding */
.content-padding {
    padding: 40px;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.badge svg,
.mobile-card-badge svg {
    width: 14px;
    height: 14px;
}

.text-mono {
    font-family: monospace;
    font-size: 13px;
}

/* Badge Color Variants - Pastel Tones */
.badge-primary {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.badge-secondary {
    background: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #e1bee7;
}

.badge-success {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.badge-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.badge-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.badge-pending {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

/* Submission Details */
.submission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.detail-group {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
}

.detail-group h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-label {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 600;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.file-preview-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.file-preview-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Mobile Card Layouts
   ============================================ */
.mobile-card-list {
    display: none;
}

.mobile-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.mobile-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-alpha);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.mobile-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mobile-card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.mobile-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mobile-card-badge.success {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
}

.mobile-card-badge.pending {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
}

.mobile-card-body {
    margin-bottom: 16px;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.mobile-card-label {
    color: var(--text-light);
    font-size: 13px;
}

.mobile-card-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mobile-card-actions .btn-sm {
    flex: 1;
    min-width: calc(50% - 4px);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .stats-grid,
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    body {
        overflow-x: hidden;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-header {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .dashboard-header,
    .page-header,
    .stats-grid,
    .services-grid {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Hide table, show cards on mobile */
    .table-view {
        display: none !important;
    }

    .card-view {
        display: block !important;
    }

    .mobile-card-list {
        display: block;
        background: transparent;
        border: none;
        padding: 0;
    }

    .mobile-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .card {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .card-body {
        padding: 0;
    }

    .content-padding {
        padding: 12px;
    }

    .page-title {
        font-size: 26px;
    }

    .stat-card,
    .service-card {
        padding: 24px;
    }

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

@media (max-width: 480px) {
    .mobile-header {
        padding: 12px 16px;
    }

    .mobile-logo span {
        font-size: 16px;
    }

    .page-header {
        padding: 20px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .dashboard-header {
        padding: 24px 16px 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 24px 16px;
    }

    .services-grid {
        padding: 0 16px 24px;
    }

    .content-padding {
        padding: 8px;
    }

    .mobile-card {
        padding: 12px;
        margin-bottom: 8px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
    }

    .btn svg {
        width: 20px;
        height: 20px;
    }

    .btn-sm {
        padding: 10px 16px;
        font-size: 13px;
        width: auto;
    }

    .modal {
        max-width: 100%;
        margin: 8px;
        border-radius: var(--radius-lg);
        max-height: 90vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        animation: slideUpMobile 0.3s ease-out;
    }

    .modal-body {
        max-height: calc(90vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .form-input,
    .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px;
    }

    /* Table mobile optimization */
    table {
        font-size: 13px;
        min-width: 500px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 12px;
    }

    th:first-child,
    td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
    }

    /* Stack action buttons vertically on mobile */
    td .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Better button group layout in table cells */
    td > div {
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
    }

    td > div .btn-sm {
        width: 100%;
    }

    /* Make dashboard header stack */
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    /* Service cards full width */
    .service-card {
        padding: 20px;
    }

    .service-card h3 {
        font-size: 18px;
    }

    .service-card p {
        font-size: 14px;
    }

    /* Stat cards improvements */
    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 32px;
    }

    .stat-label {
        font-size: 14px;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ============================================
   Enhanced Mobile Responsiveness
   ============================================ */

/* Tablet and mobile improvements */
@media (max-width: 768px) {
    /* Better modal handling */
    .modal {
        max-width: 95%;
        margin: 20px auto;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
        gap: 12px;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    /* Table responsiveness */
    .card-body {
        padding: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .card-body:has(table) {
        padding: 0;
    }

    table {
        min-width: 600px;
        font-size: 14px;
    }

    table th,
    table td {
        padding: 12px;
        white-space: nowrap;
    }

    /* Better scrollable table wrapper */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0;
    }

    /* Form improvements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Button groups */
    .page-header .btn {
        white-space: nowrap;
    }

    /* Progress steps */
    .progress-steps {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .progress-steps::-webkit-scrollbar {
        display: none;
    }

    .progress-step-label {
        font-size: 11px;
    }

    /* Card layouts */
    .card {
        border-radius: var(--radius-lg);
        margin-bottom: 20px;
    }

    /* Navigation improvements */
    .nav-item {
        padding: 16px 24px;
        font-size: 15px;
    }

    .nav-item svg {
        width: 22px;
        height: 22px;
    }

    /* User info */
    .user-info {
        padding: 16px 24px;
    }

    /* Empty states */
    .empty-state {
        padding: 60px 20px;
    }

    .empty-state h3 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 14px;
    }
}

/* Touch-friendly interactions */
@media (max-width: 768px) and (hover: none) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .stat-card:hover {
        transform: none;
    }

    /* Make tap targets larger */
    button,
    a,
    .btn {
        min-height: 44px; /* iOS recommended touch target */
    }

    .btn-sm {
        min-height: 38px;
    }

    /* Better tap feedback */
    button:active,
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    /* File upload areas */
    .file-upload {
        padding: 24px;
        min-height: 120px;
    }

    /* Modal close button */
    .modal-close {
        width: 44px;
        height: 44px;
    }
}

/* Very small screens (320px - 375px) */
@media (max-width: 375px) {
    :root {
        --radius-sm: 6px;
        --radius-md: 10px;
        --radius-lg: 14px;
        --sidebar-width: 260px;
    }

    .sidebar {
        width: 260px;
    }

    .sidebar-header {
        padding: 20px;
    }

    .nav-menu {
        padding: 16px;
    }

    .nav-item {
        padding: 12px 16px;
        font-size: 14px;
    }

    .user-section {
        padding: 16px;
    }

    .mobile-header {
        padding: 10px 12px;
    }

    .mobile-logo span {
        font-size: 15px;
    }

    .page-header {
        padding: 16px 12px;
    }

    .page-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .dashboard-header,
    .stats-grid,
    .services-grid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .stat-card,
    .service-card {
        padding: 16px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }

    .modal {
        padding: 0;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-input,
    .form-textarea {
        padding: 12px;
        font-size: 15px;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 10px 6px;
        font-size: 12px;
    }

    .logo {
        font-size: 18px;
    }

    .logo svg {
        width: 28px;
        height: 28px;
    }
}

/* Landscape mode for small devices */
@media (max-height: 600px) and (orientation: landscape) {
    .modal {
        max-height: 95vh;
        overflow-y: auto;
    }

    .modal-body {
        max-height: calc(95vh - 140px);
    }

    .sidebar {
        width: 240px;
    }

    .page-header {
        padding: 16px 20px;
    }

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

    .stat-card {
        padding: 16px;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sidebar {
        transition: none;
    }

    .modal {
        animation: none;
    }
}

/* Mobile slide up animation */
@keyframes slideUpMobile {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .sidebar-toggle,
    .modal-overlay,
    .btn,
    button {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .page-header {
        page-break-after: avoid;
    }

    table {
        page-break-inside: avoid;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   InfoCollect Form Style (for Templates page)
   ============================================ */
.infocollect-form-style .form-group {
    margin-bottom: 24px;
}

.infocollect-form-style .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.infocollect-form-style .form-group label.required::after {
    content: "*";
    color: var(--error);
    margin-left: 4px;
}

.infocollect-form-style input[type="text"],
.infocollect-form-style input[type="email"],
.infocollect-form-style input[type="tel"],
.infocollect-form-style input[type="password"],
.infocollect-form-style select,
.infocollect-form-style textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    background: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

.infocollect-form-style input:focus,
.infocollect-form-style select:focus,
.infocollect-form-style textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(44, 62, 80, 0.1);
    transform: translateY(-1px);
}

.infocollect-form-style input::placeholder,
.infocollect-form-style textarea::placeholder {
    color: var(--text-light);
}

.infocollect-form-style textarea {
    resize: vertical;
    min-height: 100px;
}

.infocollect-form-style .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.infocollect-form-style .section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(
        135deg,
        var(--primary) 0%,
        var(--primary-light) 100%
    );
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.infocollect-form-style .section-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.infocollect-form-style .section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.infocollect-form-style .input-with-prefix {
    display: flex;
    gap: 8px;
    align-items: center;
}

.infocollect-form-style .input-prefix {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 52px;
}

.infocollect-form-style .input-with-prefix input {
    flex: 1;
}

.infocollect-form-style .phone-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.infocollect-form-style .phone-separator {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 500;
}

.infocollect-form-style .password-wrapper {
    position: relative;
}

.infocollect-form-style .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.infocollect-form-style .password-toggle:hover {
    color: var(--primary);
}

.infocollect-form-style .password-toggle svg {
    width: 20px;
    height: 20px;
}

.infocollect-form-style .char-counter {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    text-align: right;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

/* File Upload Styles (General) */
.file-upload {
    width: 100%;
    padding: 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(44, 62, 80, 0.02);
}

.file-upload.has-file {
    border-color: var(--success);
    background: rgba(5, 150, 105, 0.05);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.file-upload-icon svg {
    width: 24px;
    height: 24px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-light);
}

.file-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

/* InfoCollect specific file upload styles */
.infocollect-form-style .file-upload {
    width: 100%;
    padding: 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: block;
}

.infocollect-form-style .file-upload:hover {
    border-color: var(--primary);
    background: rgba(44, 62, 80, 0.02);
}

.infocollect-form-style .file-upload.has-file {
    border-color: var(--success);
    background: rgba(5, 150, 105, 0.05);
}

.infocollect-form-style .file-upload input[type="file"] {
    display: none;
}

.infocollect-form-style .file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.infocollect-form-style .file-upload-icon svg {
    width: 24px;
    height: 24px;
}

.infocollect-form-style .file-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.infocollect-form-style .file-upload-hint {
    font-size: 12px;
    color: var(--text-light);
}

.infocollect-form-style .file-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

.infocollect-form-style .form-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 32px;
}

/* Custom Radio Button Styles - moved to common section below */

@media (max-width: 768px) {
    .infocollect-form-style .form-navigation {
        flex-direction: column-reverse;
    }

    .infocollect-form-style .btn {
        width: 100%;
        justify-content: center;
    }

    .infocollect-form-style .phone-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .infocollect-form-style .phone-separator {
        display: none;
    }

    .infocollect-form-style .input-with-prefix {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ============================================
   Common Components (Shared across all pages)
   ============================================ */

/* Common Radio Button Styles */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    min-width: 140px;
}

.radio-label:hover {
    border-color: var(--primary-light);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom {
    position: relative;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    transition: transform 0.2s ease;
}

.radio-label input[type="radio"]:checked ~ .radio-custom {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 125, 38, 0.1);
}

.radio-label input[type="radio"]:checked ~ .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label input[type="radio"]:checked ~ span:not(.radio-custom) {
    color: var(--primary);
    font-weight: 600;
}

.radio-label input[type="radio"]:focus ~ .radio-custom {
    box-shadow: 0 0 0 4px rgba(29, 125, 38, 0.15);
}

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

.radio-label span:not(.radio-custom) {
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
}

/* Common Animation Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Common Background Decorative Elements */
.decorative-bg::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(29, 125, 38, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

.decorative-bg::after {
    content: '';
    position: fixed;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217, 119, 6, 0.02) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(5deg); }
    50% { transform: translate(-15px, 15px) rotate(-3deg); }
    75% { transform: translate(25px, 10px) rotate(3deg); }
}

/* ============================================
   Client Form Page Specific Styles
   ============================================ */

/* Body override for client form */
.client-form-body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    min-height: 100vh;
    padding: 0;
}

/* Container */
.client-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* mainContent visibility controlled by inline styles from JavaScript */

/* Header */
.client-form-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInDown 0.6s ease-out;
}

.client-form-header-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    animation: scaleIn 0.5s ease-out 0.2s both;
}

.client-form-header-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.client-form-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.client-form-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Bar */
.progress-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 16px;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.progress-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.active .progress-step-circle {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.progress-step.completed .progress-step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.progress-step-label {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    font-weight: 500;
    transition: color 0.3s ease;
}

.progress-step.active .progress-step-label,
.progress-step.completed .progress-step-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Form Card */
.client-form-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-form-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Section */
.client-form-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.client-form-section.active {
    display: block;
}

.client-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.client-section-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.client-section-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.client-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Client Form specific form styles */
.client-form-group {
    margin-bottom: 24px;
    animation: slideIn 0.4s ease-out;
}

.client-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.client-form-group label.required::after {
    content: '*';
    color: var(--error);
    margin-left: 4px;
}

.client-form-group input[type="text"],
.client-form-group input[type="email"],
.client-form-group input[type="tel"],
.client-form-group input[type="password"],
.client-form-group select,
.client-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    background: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.client-form-group input:focus,
.client-form-group select:focus,
.client-form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29, 125, 38, 0.1);
    transform: translateY(-1px);
}

.client-form-group input::placeholder,
.client-form-group textarea::placeholder {
    color: var(--text-light);
}

.client-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Input with prefix */
.input-with-prefix {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-prefix {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 52px;
}

.input-with-prefix input {
    flex: 1;
}

/* Phone inputs */
.phone-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.phone-inputs input {
    flex: 1;
    text-align: center;
}

.phone-separator {
    color: var(--text-light);
    font-size: 18px;
    font-weight: 500;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* File upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload {
    width: 100%;
    padding: 20px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(29, 125, 38, 0.02);
}

.file-upload.has-file {
    border-color: var(--success);
    background: rgba(5, 150, 105, 0.05);
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--primary);
}

.file-upload-icon svg {
    width: 24px;
    height: 24px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.file-upload-hint {
    font-size: 12px;
    color: var(--text-light);
}

.file-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-top: 12px;
}

/* Character counter */
.char-counter {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
    text-align: right;
}

/* Form navigation */
.client-form-navigation {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 32px;
}

/* Success message */
.client-success-message {
    display: none;
    text-align: center;
    padding: 60px 40px;
}

.client-success-message.show {
    display: block;
    animation: fadeInScale 0.5s ease-out;
}

.client-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    animation: successPulse 2s ease-in-out infinite;
}

.client-success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.client-success-message h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.client-success-message p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Co-representative container */
.co-rep-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.co-rep-fields {
    flex: 1;
}

.co-rep-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.co-rep-field {
    margin-bottom: 12px;
}

.co-rep-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.co-rep-field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.co-rep-delete {
    flex-shrink: 0;
}

/* Corporate reg number inputs */
.corporate-reg-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.corporate-reg-inputs input {
    flex: 1;
}

.corporate-reg-separator {
    color: var(--text-secondary);
}

/* Edit mode badge */
.edit-mode-badge {
    display: none;
    margin-top: 16px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    border-radius: 12px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.edit-mode-badge svg {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* File link styles */
.file-link-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.file-link-icon {
    width: 16px;
    height: 16px;
}

.file-link {
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
}

.file-replace-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Password Modal */
.password-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.password-error {
    color: var(--error);
    font-size: 14px;
    font-weight: 500;
    min-height: 20px;
}

.password-submit-btn {
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.password-submit-btn:active {
    transform: translateY(0);
}

.password-modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.password-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.password-icon {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 16px;
}

.password-modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.password-modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.password-input-group input {
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.password-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(29, 125, 38, 0.1);
}

/* Client form animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-lg);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 32px rgba(5, 150, 105, 0.3);
    }
}

/* Client Form Responsive */
@media (max-width: 768px) {
    .client-form-container {
        padding: 24px 16px;
    }

    .client-form-card {
        padding: 24px;
    }

    .client-form-header h1 {
        font-size: 24px;
    }

    .progress-steps {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .progress-step-label {
        font-size: 11px;
        max-width: 80px;
    }

    .client-section-title {
        font-size: 20px;
    }

    .client-form-navigation {
        flex-direction: column-reverse;
    }

    .client-form-navigation .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .phone-inputs {
        flex-direction: column;
        gap: 8px;
    }

    .phone-separator {
        display: none;
    }

    .input-with-prefix {
        flex-direction: column;
        align-items: stretch;
    }
}
/* ============================================
   Business Card Management Styles
   ============================================ */

/* Business Card Scanner Upload Area */
.card-scanner-upload-area {
    position: relative;
    width: 100%;
    padding: 60px 40px;
    border: 3px dashed var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
    overflow: hidden;
}

.card-scanner-upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(29, 125, 38, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card-scanner-upload-area:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-alpha) 0%, var(--bg-tertiary) 100%);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-scanner-upload-area:hover::before {
    opacity: 1;
}

.card-scanner-upload-area.has-image {
    border-color: var(--success);
    border-style: solid;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.05) 0%, var(--bg-tertiary) 100%);
}

/* Business Card Item (명함처럼 보이는 카드) */
.business-card-item {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.business-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.business-card-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-alpha);
}

.business-card-item:hover::before {
    transform: scaleX(1);
}

/* Business Card Thumbnail */
.business-card-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.business-card-thumbnail:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(29, 125, 38, 0.15);
}

/* OCR Result Section */
.ocr-result-section {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ocr-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.ocr-result-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(29, 125, 38, 0.2);
}

.ocr-result-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.ocr-result-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Email Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.badge-success {
    background: linear-gradient(135deg, var(--success) 0%, #10b981 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, var(--error) 0%, #ef4444 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    color: white;
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
}

/* Scanner Preview Section */
.scanner-preview-section {
    position: relative;
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scanner-preview-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    margin-bottom: 20px;
}

/* Settings Card */
.settings-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.settings-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.settings-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.settings-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* My Business Card Preview */
.my-card-preview {
    position: relative;
    text-align: center;
    padding: 32px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    margin-bottom: 24px;
}

.my-card-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.my-card-preview img:hover {
    transform: scale(1.02);
}

.my-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(29, 125, 38, 0.2);
}

/* Business Card Detail Modal */
.business-card-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.business-card-detail-image {
    position: sticky;
    top: 20px;
}

.business-card-detail-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.business-card-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Also support legacy class names */
.business-card-image-section {
    position: sticky;
    top: 20px;
}

.business-card-image-section img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.business-card-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.business-card-field {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.business-card-field:hover {
    background: var(--bg-primary);
    border-left-width: 6px;
    transform: translateX(4px);
}

.business-card-field label,
.business-card-field-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.business-card-field-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.business-card-field-value.primary,
.business-card-field-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

/* Empty State for Business Cards */
.business-cards-empty {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.business-cards-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--primary-alpha);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.business-cards-empty-icon svg {
    width: 40px;
    height: 40px;
}

.business-cards-empty h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.business-cards-empty p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

/* OCR Progress Indicator */
.ocr-progress {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-alpha) 0%, var(--bg-tertiary) 100%);
    border-radius: 24px;
    border: 2px solid var(--primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(29, 125, 38, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(29, 125, 38, 0);
    }
}

.ocr-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--primary-alpha);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .business-card-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .business-card-detail-image,
    .business-card-image-section {
        position: relative;
        top: 0;
    }

    .card-scanner-upload-area {
        padding: 40px 24px;
    }

    .ocr-result-section {
        padding: 24px;
    }

    .settings-card {
        padding: 24px;
    }

    .my-card-preview {
        padding: 24px;
    }

    .business-cards-empty {
        padding: 60px 24px;
    }
}

/* Animation for business card list items */
.business-card-item {
    animation: fadeInUp 0.4s ease-out backwards;
}

.business-card-item:nth-child(1) { animation-delay: 0.05s; }
.business-card-item:nth-child(2) { animation-delay: 0.1s; }
.business-card-item:nth-child(3) { animation-delay: 0.15s; }
.business-card-item:nth-child(4) { animation-delay: 0.2s; }
.business-card-item:nth-child(5) { animation-delay: 0.25s; }
.business-card-item:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   Statistics & Tags Styles
   ============================================ */

/* Badge styles for order status */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

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

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

/* Tag badge for invoice tags */
.tag-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
    white-space: nowrap;
}

/* Checkbox labels */
.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary);
}

/* Tag checkbox hover effect */
.tag-checkbox {
    transition: all 0.2s;
}

.tag-checkbox:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Tag item in management modal */
.tag-item {
    transition: background 0.2s;
}

.tag-item:hover {
    background: var(--bg-tertiary) !important;
}

/* Card header for charts */
.card-header {
    padding: 20px 24px 0;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Statistics grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Statistics filter controls */
.stats-quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stats-date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.stats-update-btn {
    height: 44px;
    white-space: nowrap;
}

/* Statistics charts grid */
.stats-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-container {
    position: relative;
    padding: 20px;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Keep filter card box styling on mobile */
    .stats-filter-card {
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border) !important;
        box-shadow: var(--shadow-sm) !important;
        border-radius: var(--radius-lg) !important;
    }

    .stats-filter-card .card-body {
        padding: 16px !important;
    }

    .stats-quick-filters {
        gap: 6px;
    }

    .stats-quick-filters .btn {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 13px;
    }

    .stats-date-inputs {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stats-update-btn {
        height: 48px;
        width: 100%;
    }

    .stats-charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-container {
        padding: 12px;
    }

    .card-header {
        padding: 16px 16px 0;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    /* Keep filter card box styling on mobile */
    .stats-filter-card {
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border) !important;
        box-shadow: var(--shadow-sm) !important;
        border-radius: var(--radius-lg) !important;
    }

    .stats-filter-card .card-body {
        padding: 12px !important;
    }

    .stats-quick-filters .btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .chart-container {
        padding: 8px;
    }

    .card-header {
        padding: 12px 12px 0;
    }

    .card-title {
        font-size: 14px;
        font-weight: 600;
    }
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

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

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

.pagination-btn svg {
    width: 20px;
    height: 20px;
}

.pagination-ellipsis {
    padding: 8px;
    color: var(--text-light);
    font-size: 14px;
}

@media (max-width: 480px) {
    .pagination {
        gap: 4px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 13px;
    }
}
