/* ============================================
   COMPONENTS - Buttons, Cards, Forms, Modals
   ============================================ */

/* ----------------------------------------
   Summary Cards
   ---------------------------------------- */
.summary-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--gray-200);
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    text-align: left;
    transition: all var(--transition-slow);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.summary-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.08));
    opacity: 0;
    transition: opacity var(--transition);
}

.summary-card:hover::before {
    opacity: 1;
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gray-300);
}

.summary-card h3 {
    font-size: 0.7rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--gray-600);
}

.summary-card .amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn {
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition);
    letter-spacing: 0.01em;
    font-size: 12px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px -2px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
    box-shadow: 0 4px 12px -2px rgba(51, 65, 85, 0.35);
}

.btn-secondary:hover {
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-dark) 100%);
    box-shadow: 0 4px 12px -2px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.btn-info {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    box-shadow: 0 4px 12px -2px rgba(6, 182, 212, 0.35);
}

.btn-info:hover {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    box-shadow: 0 4px 12px -2px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

/* Icon Buttons */
.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    min-width: 30px;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.btn-icon.btn-pdf {
    background: var(--primary);
}

.btn-icon.btn-pdf:hover {
    background: var(--primary-dark);
}

.btn-icon.btn-delete {
    background: var(--danger);
}

.btn-icon.btn-delete:hover {
    background: var(--danger-dark);
}

.btn-icon.btn-edit {
    background: var(--secondary);
}

.btn-icon.btn-edit:hover {
    background: #7c3aed;
}

.btn-icon.btn-toggle-active {
    background: var(--success);
}

.btn-icon.btn-toggle-active:hover {
    background: var(--success-dark);
}

.btn-icon.btn-toggle-inactive {
    background: var(--gray-400);
}

.btn-icon.btn-toggle-inactive:hover {
    background: var(--gray-500);
}

/* File Input */
.file-input {
    display: none;
}

.file-input-label {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ----------------------------------------
   Form Elements
   ---------------------------------------- */
.input-field {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 13px;
    transition: all var(--transition);
    min-width: 150px;
    background: var(--white);
    font-weight: 500;
    color: var(--gray-800);
    box-shadow: none;
}

/* ----------------------------------------
   Profile Form (Modern Layout)
   ---------------------------------------- */
.profile-form {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-form-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 18px 20px 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.profile-form-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), rgba(16, 185, 129, 0.15));
}

.profile-form-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.profile-form .wizard-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-form .wizard-step-description {
    font-size: 12px;
    color: var(--gray-500);
}

.profile-form .step-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    color: var(--primary-dark);
    font-size: 14px;
}

.profile-grid {
    gap: 14px 18px;
}

.profile-form .form-group {
    margin-bottom: 0;
}

.profile-form label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.profile-form .radio-group-row,
.profile-form .checkbox-group {
    gap: 10px 14px;
}

.profile-form .radio-option,
.profile-form .checkbox-group label {
    font-size: 12px;
    color: var(--gray-700);
}

.profile-form .input-with-button {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-form .input-with-button .btn {
    height: 36px;
    white-space: nowrap;
}

.profile-form .wizard-nav {
    padding: 12px 0 0;
}

/* Profile Type highlight */
.profile-type-card {
    border-color: rgba(14, 116, 144, 0.2);
    background: linear-gradient(135deg, rgba(236, 254, 255, 0.6), rgba(255, 255, 255, 0.9));
    box-shadow: 0 10px 22px -16px rgba(14, 116, 144, 0.35);
}

.profile-type-card::after {
    background: linear-gradient(90deg, rgba(14, 116, 144, 0.35), rgba(16, 185, 129, 0.15));
}

.profile-type-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.profile-type-options label {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all var(--transition-fast);
}

/* ----------------------------------------
   Profile Form (Compact Admin Layout)
   ---------------------------------------- */
.profile-management.compact-admin .profile-form,
.profile-form.compact-admin {
    gap: 12px;
}

.profile-form.compact-admin .profile-form-card {
    padding: 12px 14px;
    background: transparent;
    border-color: var(--gray-200);
    box-shadow: none;
}

.profile-form.compact-admin .profile-form-card::after {
    display: none;
}

.profile-form.compact-admin .profile-form-header {
    margin-bottom: 8px;
}

.profile-form.compact-admin .wizard-step-title {
    font-size: 0.85rem;
}

.profile-form.compact-admin .wizard-step-description {
    font-size: 11px;
}

.profile-form.compact-admin .profile-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px 12px;
}

.profile-form.compact-admin label {
    font-size: 11px;
    margin-bottom: 4px;
}

.profile-form.compact-admin .input-field {
    padding: 7px 10px;
    font-size: 12px;
}

.profile-form.compact-admin .radio-group-row,
.profile-form.compact-admin .checkbox-group {
    gap: 6px 10px;
}

.profile-form.compact-admin .profile-type-card {
    background: transparent;
    border-color: var(--gray-200);
    box-shadow: none;
}

.profile-form.compact-admin .profile-type-card::after {
    display: none;
}

.profile-form .chip-toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-form .toggle-chip {
    display: inline-flex;
    align-items: center;
}

.profile-form .toggle-chip input {
    display: none;
}

.profile-form .toggle-chip .chip-text {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--white);
    transition: all var(--transition);
}

.profile-form .toggle-chip input:checked + .chip-text {
    background: var(--gray-900);
    border-color: var(--gray-900);
    color: var(--white);
}

.profile-form .toggle-chip input:focus + .chip-text {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.profile-form .compact-section {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: transparent;
}

.profile-form .compact-section[open] {
    border-color: var(--gray-300);
}

.profile-form .compact-section summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
}

.profile-form .compact-section summary::-webkit-details-marker {
    display: none;
}

.profile-form .compact-section .compact-content {
    padding: 0 14px 12px;
}

.profile-management.compact-admin .template-section.compact-section {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: transparent;
}

.profile-management.compact-admin .template-section.compact-section summary {
    padding: 10px 14px;
}

.profile-management.compact-admin .template-section.compact-section .compact-content {
    padding: 0 14px 12px;
}

.profile-type-options input {
    accent-color: var(--primary);
}

.profile-type-options label:hover {
    border-color: var(--primary-light);
    background: rgba(59, 130, 246, 0.06);
}

/* ----------------------------------------
   Profile Form — Enhanced Visibility
   ---------------------------------------- */

/* Grid columns as distinct cards */
.profile-management.compact-admin .profile-grid-layout .grid-col {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.profile-management.compact-admin .profile-grid-layout .grid-col:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

/* Section headers inside cards */
.profile-management.compact-admin .grid-col .section-label {
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--gray-600) !important;
    border-bottom: 2px solid var(--primary-light) !important;
    padding-bottom: 10px !important;
    margin-bottom: 18px !important;
    font-weight: 700 !important;
}

/* Colored left-border accent per section */
.profile-management.compact-admin .profile-grid-layout .grid-col:nth-child(1) {
    border-left: 3px solid #8b5cf6;
}
.profile-management.compact-admin .profile-grid-layout .grid-col:nth-child(1) .section-label {
    border-bottom-color: #c4b5fd !important;
}

.profile-management.compact-admin .profile-grid-layout .grid-col:nth-child(2) {
    border-left: 3px solid var(--primary);
}
.profile-management.compact-admin .profile-grid-layout .grid-col:nth-child(2) .section-label {
    border-bottom-color: var(--primary-light) !important;
}

.profile-management.compact-admin .profile-grid-layout .grid-col:nth-child(3) {
    border-left: 3px solid var(--success);
}
.profile-management.compact-admin .profile-grid-layout .grid-col:nth-child(3) .section-label {
    border-bottom-color: var(--success-light) !important;
}

/* Form labels — bolder and darker */
.profile-management.compact-admin .form-label {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: var(--gray-700) !important;
    margin-bottom: 6px !important;
}

/* Input fields inside profile form — better contrast */
.profile-management.compact-admin .grid-col .input-field {
    border: 1.5px solid var(--gray-300) !important;
    border-radius: 6px !important;
    padding: 9px 12px !important;
    font-size: 0.88rem !important;
    background: var(--white) !important;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.profile-management.compact-admin .grid-col .input-field:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none;
}

.profile-management.compact-admin .grid-col .input-field:hover:not(:focus) {
    border-color: var(--gray-400) !important;
}

/* Radio buttons & checkboxes — bigger tap targets */
.profile-management.compact-admin .radio-group label,
.profile-management.compact-admin .checkbox-group .checkbox-label {
    padding: 6px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-50);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.profile-management.compact-admin .radio-group label:hover,
.profile-management.compact-admin .checkbox-group .checkbox-label:hover {
    border-color: var(--primary-light);
    background: var(--primary-ultra-light);
}

.profile-management.compact-admin .radio-group label:has(input:checked),
.profile-management.compact-admin .checkbox-group .checkbox-label:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    font-weight: 600;
}

/* Card header — sticky bar with better prominence */
.profile-management.compact-admin .card-header {
    background: linear-gradient(to right, var(--gray-50), var(--white)) !important;
    border-bottom: 2px solid var(--gray-200) !important;
    padding: 16px 20px !important;
}

.profile-management.compact-admin .card-header h4 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: var(--gray-900) !important;
}

/* Editing mode indicator */
.profile-management.compact-admin .card.is-editing {
    border: 2px solid var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--shadow-md) !important;
}

.profile-management.compact-admin .card.is-editing .card-header {
    background: linear-gradient(to right, var(--primary-ultra-light), var(--white)) !important;
    border-bottom-color: var(--primary-light) !important;
}

.profile-management.compact-admin .card.is-editing .card-header h4::before {
    content: '✏️ ';
}

/* "Other Details" sub-section */
.profile-management.compact-admin .grid-col .border-top {
    border-top: 1.5px dashed var(--gray-300) !important;
    margin-top: 18px !important;
    padding-top: 15px !important;
}

/* Profile Roles box — more prominent */
.profile-management.compact-admin .grid-col .checkbox-group {
    background: var(--gray-50) !important;
    border: 1.5px solid var(--gray-200) !important;
    border-radius: var(--radius) !important;
    padding: 12px !important;
}

/* Required field asterisk */
.profile-management.compact-admin .form-label span[style*="color: red"] {
    color: var(--danger) !important;
    font-weight: 700;
}

/* Save/Cancel buttons area */
.profile-management.compact-admin .card-header .action-buttons .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

.profile-management.compact-admin .card-header .action-buttons .btn-primary:hover {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px);
}

/* Profile table section title */
.profile-management.compact-admin > .section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 20px;
}

.input-field::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.name-field {
    min-width: 280px !important;
    width: 300px !important;
}

.hourly-numeric-field {
    min-width: 80px !important;
    width: 90px !important;
}

.notes-field {
    min-width: 120px !important;
    width: 140px !important;
    resize: vertical;
    height: 50px;
}

.input-field:hover {
    border-color: var(--gray-400);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.readonly {
    background-color: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    cursor: not-allowed;
}

select.input-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Profile Form */
.profile-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.profile-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.profile-form h3 {
    color: var(--gray-900);
    margin-bottom: 20px;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-form h3::before {
    content: '✏️';
    font-size: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 500;
    font-size: 13px;
    color: var(--gray-700);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    color: var(--gray-700);
    transition: color var(--transition-fast);
}

.checkbox-group label:hover {
    color: var(--gray-900);
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Profile Selector */
.profile-selector {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: none;
    position: relative;
    max-width: 320px;
}

.profile-selector select {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-radius: var(--radius);
    background: var(--white);
    font-size: 13px;
    color: var(--gray-800);
    transition: all var(--transition);
    cursor: pointer;
}

.profile-selector select:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary);
}

.profile-selector select:hover {
    background: var(--gray-50);
}

/* Template Section */
.template-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 24px;
    position: relative;
}

.template-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #14b8a6);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.template-section h4 {
    color: var(--gray-800);
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 1rem;
}

.template-section select {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    font-size: 13px;
    color: var(--gray-800);
    transition: all var(--transition);
    margin-right: 12px;
    min-width: 200px;
}

.template-section select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.template-section select:hover {
    border-color: var(--gray-400);
}

.template-buttons {
    display: flex;
    gap: 10px;
}

/* ----------------------------------------
   Search Input
   ---------------------------------------- */
.table-search {
    margin-bottom: 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid rgba(66, 153, 225, 0.2);
    border-radius: 10px;
    background: white;
    font-size: 14px;
    color: #2d3748;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-input:hover {
    border-color: rgba(66, 153, 225, 0.4);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    pointer-events: none;
}

.search-results {
    font-size: 12px;
    color: #718096;
    margin-top: 8px;
    font-style: italic;
}

.no-results {
    color: #e53e3e;
}

.table-row-hidden {
    display: none !important;
}

/* ----------------------------------------
   Badges
   ---------------------------------------- */
.user-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(128, 90, 213, 0.2);
    color: #805ad5;
    border: 1px solid rgba(128, 90, 213, 0.3);
    display: none;
}

.attachment-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}

.attachment-badge.has-file {
    background: rgba(72, 187, 120, 0.15);
    color: #2f855a;
    border-color: rgba(72, 187, 120, 0.35);
    cursor: pointer;
}

.attachment-badge.no-file {
    background: #edf2f7;
    color: #718096;
    border-color: #e2e8f0;
}

/* Payment Status */
.payment-status {
    padding: 5px 12px;
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    min-width: 90px;
    display: inline-block;
    border: none;
}

.payment-status:hover {
    transform: scale(1.02);
}

.payment-status:active {
    transform: scale(0.98);
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.12) !important;
    color: #b45309 !important;
}

.status-processing {
    background-color: rgba(99, 102, 241, 0.12) !important;
    color: var(--primary-dark) !important;
}

.status-paid {
    background-color: rgba(16, 185, 129, 0.12) !important;
    color: var(--success-dark) !important;
}

.status-failed {
    background-color: rgba(239, 68, 68, 0.12) !important;
    color: var(--danger-dark) !important;
}

/* Action Buttons */
.actions-cell {
    white-space: nowrap;
    min-width: 100px;
}

.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.table-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    min-width: 60px;
}

/* ----------------------------------------
   Modals
   ---------------------------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease-in-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--white);
    margin: auto;
    padding: 0;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 800px;
    box-shadow: var(--shadow-2xl);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    color: var(--white);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.modal-body {
    padding: 25px;
}

.modal-body label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.modal-footer {
    padding: 20px 25px;
    background-color: var(--gray-50);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ----------------------------------------
   Wizard
   ---------------------------------------- */
.wizard {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
    display: none;
    position: fixed;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 1000;
}

.wizard.active {
    display: block;
}

.wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.wizard-overlay.active {
    display: block;
}

.wizard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.wizard-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.wizard-step {
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wizard-step.active {
    background: #4299e1;
    color: white;
}

.wizard-step.completed {
    background: #38a169;
    color: white;
}

.wizard-step:not(.active):not(.completed) {
    background: #e2e8f0;
    color: #718096;
}

.wizard-step-content {
    display: none;
}

.wizard-step-content.active {
    display: block;
}

.wizard-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* ----------------------------------------
   Loading Overlay
   ---------------------------------------- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-overlay.active {
    display: flex;
}

.loading-box {
    background: var(--white);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--gray-800);
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.loading-message {
    font-weight: 600;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #fef2f2;
    color: var(--danger-dark);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    max-width: 360px;
    z-index: 3100;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.error-toast-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 14px;
}

.error-toast-close {
    float: right;
    cursor: pointer;
    margin-left: 12px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.error-toast-close:hover {
    opacity: 1;
}

/* ----------------------------------------
   EOD Banner
   ---------------------------------------- */
.eod-banner {
    display: none;
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: #fff;
    padding: 12px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.4);
}

.eod-banner.active {
    display: block;
}

.eod-banner.critical {
    background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
    animation: eod-pulse 1s infinite;
}

@keyframes eod-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.eod-banner .eod-time {
    font-weight: 700;
    margin: 0 4px;
}

/* ----------------------------------------
   Login Overlay
   ---------------------------------------- */
.login-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.login-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.login-overlay.active {
    display: flex;
}

.login-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-box h2 {
    margin-bottom: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.login-box p {
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-field input {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.login-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.login-error {
    color: var(--danger);
    font-size: 0.8rem;
    min-height: 20px;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.login-actions .btn {
    padding: 12px 28px;
    font-size: 14px;
}

/* ----------------------------------------
   Settings & System Health
   ---------------------------------------- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.settings-group h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #2d3748;
}

.settings-field {
    margin-bottom: 10px;
    font-size: 12px;
}

.settings-field label {
    display: block;
    margin-bottom: 4px;
    color: #4a5568;
    font-weight: 500;
}

.settings-field-inline {
    margin-bottom: 10px;
    font-size: 12px;
    color: #4a5568;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.health-card {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    font-size: 12px;
    color: #2d3748;
}

.health-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.health-subtext {
    font-size: 11px;
    color: #4a5568;
}

.health-subrow {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #4a5568;
}

.health-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.health-pill-unknown {
    background: #edf2f7;
    color: #4a5568;
}

.health-pill-ok {
    background: #c6f6d5;
    color: #22543d;
}

.health-pill-error {
    background: #fed7d7;
    color: #742a2a;
}

/* ----------------------------------------
   Expense Breakdown
   ---------------------------------------- */
.expense-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.expense-summary-card {
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid #4a5568;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.expense-summary-card .label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #a0aec0;
    margin-bottom: 4px;
}

.expense-summary-card .value {
    font-size: 16px;
    font-weight: 700;
}

.expense-summary-card .subtext {
    font-size: 11px;
    color: #cbd5f5;
    margin-top: 2px;
}

.expense-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    color: #4a5568;
}

.expense-filters label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.expense-filters select {
    min-width: 130px;
    padding: 6px 10px;
    font-size: 12px;
}

/* ----------------------------------------
   MIS Charts
   ---------------------------------------- */
.mis-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.chart-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.chart-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-300);
}

.chart-card-wide {
    grid-column: span 1;
}

@media (min-width: 1200px) {
    .chart-card-wide {
        grid-column: span 2;
    }
    .mis-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.chart-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.chart-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.chart-container {
    position: relative;
    width: 100%;
}

.chart-container-pie {
    height: 220px;
}

.chart-container-bar {
    height: 280px;
}

/* Chart Legend (custom) */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--gray-700);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-label {
    font-weight: 500;
}

.legend-value {
    color: var(--gray-500);
    font-size: 0.7rem;
}

/* Chart Summary */
.chart-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.chart-summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-summary .summary-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.chart-summary .summary-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
}

.chart-summary .summary-value.text-success {
    color: var(--success);
}

.chart-summary .summary-value.text-danger {
    color: var(--danger);
}

/* Chart Empty State */
.chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
    color: var(--gray-400);
    gap: 8px;
}

.chart-empty-state .empty-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.chart-empty-state .empty-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Responsive adjustments for charts */
@media (max-width: 768px) {
    .mis-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card-wide {
        grid-column: span 1;
    }
    
    .chart-container-pie {
        height: 200px;
    }
    
    .chart-container-bar {
        height: 240px;
    }
    
    .chart-legend {
        gap: 6px 12px;
    }
    
    .chart-summary {
        gap: 8px 16px;
    }
}

/* ----------------------------------------
   Expense Bill Upload
   ---------------------------------------- */

/* Bill cell in expense table */
.bill-cell {
    text-align: center;
    padding: 4px 6px;
    width: 50px;
    min-width: 50px;
}

/* Compact expense table for better fit */
#expenseTable th,
#expenseTable td {
    padding: 8px 10px;
}

#expenseTable .input-field {
    padding: 6px 8px;
}

#expenseTable .notes-field {
    min-width: 100px;
    max-width: 140px;
}

#expenseTable .actions-cell {
    width: 80px;
    min-width: 80px;
}

.btn-bill {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-bill.no-bill {
    background: var(--gray-100);
    color: var(--gray-500);
}

.btn-bill.no-bill:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.btn-bill.has-bill {
    background: var(--success);
    color: white;
}

.btn-bill.has-bill:hover {
    background: #059669;
    transform: scale(1.1);
}

/* Bill upload modal */
.bill-info-section {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

.bill-info-section p {
    margin: 4px 0;
    color: var(--gray-700);
}

.current-file-section {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.current-file-section .file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #065f46;
    font-weight: 500;
}

.current-file-section .file-icon {
    font-size: 20px;
}

.current-file-section .file-actions {
    display: flex;
    gap: 8px;
}

/* Upload drop zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-50);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.upload-zone .upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.upload-zone p {
    margin: 4px 0;
    color: var(--gray-600);
    font-size: 14px;
}

.upload-zone .upload-hint {
    font-size: 12px;
    color: var(--gray-400);
}

/* Selected file display */
.selected-file {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-top: 12px;
}

.selected-file .file-icon {
    font-size: 18px;
}

.selected-file .btn-clear {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0 4px;
}

.selected-file .btn-clear:hover {
    color: var(--danger);
}

/* Upload progress */
.upload-progress {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0;
    animation: progress-indeterminate 1.5s ease-in-out infinite;
}

@keyframes progress-indeterminate {
    0% { width: 0; margin-left: 0; }
    50% { width: 50%; margin-left: 25%; }
    100% { width: 0; margin-left: 100%; }
}

.progress-text {
    font-size: 12px;
    color: var(--gray-500);
    text-align: center;
    display: block;
    margin-top: 6px;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 3001;
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.toast-notification.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.toast-notification.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ----------------------------------------
   Skeleton Loading Components
   ---------------------------------------- */

/* Base skeleton element */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-100) 25%,
        var(--gray-200) 50%,
        var(--gray-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius);
    display: inline-block;
    line-height: 1;
    color: transparent !important;
    min-height: 1em;
}

/* Shimmer animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: var(--gray-200);
    }
}

/* Skeleton Variants - Size */
.skeleton-xs { height: 10px; width: 60px; }
.skeleton-sm { height: 14px; width: 80px; }
.skeleton-md { height: 18px; width: 120px; }
.skeleton-lg { height: 24px; width: 160px; }
.skeleton-xl { height: 32px; width: 200px; }

/* Full width skeleton */
.skeleton-full { width: 100%; }

/* Circle skeleton (for avatars, icons) */
.skeleton-circle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.skeleton-circle-lg {
    width: 60px;
    height: 60px;
}

/* Summary Card Skeleton */
.skeleton-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: var(--shadow-md);
}

.skeleton-card .skeleton-card-title {
    height: 12px;
    width: 100px;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-card-amount {
    height: 32px;
    width: 140px;
}

/* Table Row Skeleton */
.skeleton-table-row td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-100);
}

.skeleton-table-row .skeleton-cell {
    height: 16px;
    border-radius: 4px;
}

.skeleton-table-row .skeleton-cell-name {
    width: 150px;
}

.skeleton-table-row .skeleton-cell-amount {
    width: 80px;
}

.skeleton-table-row .skeleton-cell-status {
    width: 70px;
}

.skeleton-table-row .skeleton-cell-actions {
    width: 100px;
}

/* Profile Form Skeleton */
.skeleton-form-group {
    margin-bottom: 16px;
}

.skeleton-form-group .skeleton-label {
    height: 14px;
    width: 100px;
    margin-bottom: 8px;
}

.skeleton-form-group .skeleton-input {
    height: 38px;
    width: 100%;
    border-radius: var(--radius);
}

/* Sidebar Navigation Skeleton */
.skeleton-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    gap: 10px;
}

.skeleton-nav-item .skeleton-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
}

.skeleton-nav-item .skeleton-text {
    height: 14px;
    width: 80px;
}

/* Chart Skeleton */
.skeleton-chart {
    height: 280px;
    width: 100%;
    border-radius: var(--radius-md);
}

/* Skeleton Container with Fade Transition */
.skeleton-container {
    position: relative;
}

.skeleton-container .skeleton-content {
    transition: opacity 0.3s ease;
}

.skeleton-container.loading .skeleton-content {
    display: block;
}

.skeleton-container.loaded .skeleton-content {
    display: none;
}

.skeleton-container .real-content {
    transition: opacity 0.3s ease;
}

.skeleton-container.loading .real-content {
    display: none;
}

.skeleton-container.loaded .real-content {
    display: block;
    animation: skeleton-fadeIn 0.3s ease;
}

@keyframes skeleton-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ----------------------------------------
   Multi-Step Form Wizard
   ---------------------------------------- */

/* Wizard Container */
.form-wizard {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

/* Progress line behind steps */
.wizard-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 2px;
    background: var(--gray-200);
    transform: translateY(-50%);
    z-index: 0;
}

/* Individual Step Indicator */
.wizard-step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all var(--transition);
}

/* Step Circle */
.wizard-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all var(--transition);
    background: var(--gray-100);
    color: var(--gray-500);
    border: 2px solid var(--gray-200);
}

/* Step Label */
.wizard-step-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    text-align: center;
    max-width: 100px;
    transition: color var(--transition);
}

/* Step States */
.wizard-step-indicator.active .wizard-step-circle {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.wizard-step-indicator.active .wizard-step-label {
    color: var(--primary);
    font-weight: 600;
}

.wizard-step-indicator.completed .wizard-step-circle {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.wizard-step-indicator.completed .wizard-step-circle::after {
    content: '✓';
    font-size: 16px;
}

.wizard-step-indicator.completed .wizard-step-label {
    color: var(--success);
}

.wizard-step-indicator.error .wizard-step-circle {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.wizard-step-indicator.error .wizard-step-label {
    color: var(--danger);
}

/* Wizard Content Area */
.wizard-content {
    padding: 30px;
    min-height: 400px;
    position: relative;
}

/* Individual Step Panel */
.wizard-step-panel {
    display: none;
    animation: wizardFadeIn 0.3s ease;
}

.wizard-step-panel.active {
    display: block;
}

@keyframes wizardFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step Title */
.wizard-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wizard-step-title .step-icon {
    font-size: 1.5rem;
}

.wizard-step-description {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Wizard Navigation */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.wizard-nav-left,
.wizard-nav-right {
    display: flex;
    gap: 10px;
}

/* Step Summary (shown in review step) */
.wizard-summary {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.wizard-summary-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.wizard-summary-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wizard-summary-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wizard-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.wizard-summary-label {
    color: var(--gray-500);
}

.wizard-summary-value {
    color: var(--gray-800);
    font-weight: 500;
}

.wizard-summary-edit {
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    margin-left: 8px;
}

.wizard-summary-edit:hover {
    text-decoration: underline;
}

/* Mobile Responsive for Wizard */
@media (max-width: 768px) {
    .wizard-progress {
        padding: 15px;
        overflow-x: auto;
    }
    
    .wizard-progress::before {
        left: 30px;
        right: 30px;
    }
    
    .wizard-step-indicator {
        min-width: 70px;
    }
    
    .wizard-step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .wizard-step-label {
        font-size: 10px;
        max-width: 70px;
    }
    
    .wizard-content {
        padding: 20px;
    }
    
    .wizard-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .wizard-nav-left,
    .wizard-nav-right {
        width: 100%;
    }
    
    .wizard-nav .btn {
        width: 100%;
    }
}

/* ----------------------------------------
   Real-Time Form Validation
   ---------------------------------------- */

/* Validation States */
.form-group {
    position: relative;
}

.form-group.validating .input-field {
    border-color: var(--primary);
}

.form-group.valid .input-field {
    border-color: var(--success);
    padding-right: 36px;
}

.form-group.valid .input-field:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.form-group.invalid .input-field {
    border-color: var(--danger);
    padding-right: 36px;
}

.form-group.invalid .input-field:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Validation Icons */
.form-group.valid::after,
.form-group.invalid::after {
    position: absolute;
    right: 12px;
    top: 32px;
    font-size: 16px;
    pointer-events: none;
}

.form-group.valid::after {
    content: '✓';
    color: var(--success);
}

.form-group.invalid::after {
    content: '!';
    color: var(--danger);
    font-weight: bold;
}

/* Validation Message */
.validation-message {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    min-height: 16px;
    transition: all var(--transition-fast);
}

.form-group.valid .validation-message {
    color: var(--success);
}

.form-group.invalid .validation-message {
    color: var(--danger);
}

/* Input with Button */
.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button .input-field {
    flex: 1;
}

/* Smart Suggestion */
.smart-suggestion {
    display: block;
    font-size: 11px;
    color: var(--primary);
    margin-top: 4px;
    cursor: pointer;
}

.smart-suggestion:hover {
    text-decoration: underline;
}

.smart-suggestion::before {
    content: '💡 ';
}

/* Async Validation Spinner */
.form-group.validating::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 12px;
}

/* IFSC Bank Name Hint */
.ifsc-bank-hint {
    font-size: 11px;
    color: var(--success);
    margin-top: 4px;
}

.ifsc-bank-hint.error {
    color: var(--danger);
}
