/* ==========================================================================
   REUSABLE COMPONENT CLASSES FOR SCANASIGN
   ========================================================================== */

/* Dark Mode Utility Classes - Essential for dark theme */
.dark .bg-gray-50 { background-color: #111827; }
.dark .bg-gray-100 { background-color: #1f2937; }
.dark .bg-gray-200 { background-color: #374151; }
.dark .bg-gray-800 { background-color: #1f2937; }
.dark .bg-gray-900 { background-color: #111827; }
.dark .bg-white { background-color: #1f2937; }

.dark .text-gray-900 { color: #f9fafb; }
.dark .text-gray-800 { color: #e5e7eb; }
.dark .text-gray-700 { color: #d1d5db; }
.dark .text-gray-600 { color: #9ca3af; }
.dark .text-gray-500 { color: #6b7280; }
.dark .text-gray-400 { color: #9ca3af; }
.dark .text-gray-300 { color: #d1d5db; }
.dark .text-white { color: #f9fafb; }

.dark .border-gray-200 { border-color: #374151; }
.dark .border-gray-300 { border-color: #4b5563; }
.dark .border-gray-600 { border-color: #4b5563; }
.dark .border-gray-700 { border-color: #374151; }

.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #374151; }
.dark .divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: #4b5563; }

.dark .hover\:bg-gray-50:hover { background-color: #374151; }
.dark .hover\:bg-gray-600:hover { background-color: #4b5563; }
.dark .hover\:bg-gray-700:hover { background-color: #374151; }
.dark .bg-gray-700 { background-color: #374151 !important; }
.dark .focus\:ring-offset-gray-800:focus { --tw-ring-offset-color: #1f2937; }

/* Indigo colors for buttons and links */
.dark .text-indigo-600 { color: #818cf8; }
.dark .text-indigo-400 { color: #a5b4fc; }
.dark .hover\:text-indigo-300:hover { color: #c7d2fe; }
.dark .hover\:text-indigo-900:hover { color: #e0e7ff; }

/* Red colors for delete buttons */
.dark .text-red-600 { color: #f87171; }
.dark .text-red-400 { color: #fca5a5; }
.dark .hover\:text-red-300:hover { color: #fca5a5; }
.dark .hover\:text-red-900:hover { color: #fee2e2; }

/* Status badge colors */
.dark .bg-green-100 { background-color: #14532d; }
.dark .bg-green-900 { background-color: #14532d; }
.dark .text-green-800 { color: #86efac; }
.dark .text-green-300 { color: #86efac; }

.dark .bg-yellow-100 { background-color: #92400e; }
.dark .bg-yellow-900 { background-color: #92400e; }
.dark .text-yellow-800 { color: #fbbf24; }
.dark .text-yellow-300 { color: #fbbf24; }

.dark .bg-blue-100 { background-color: #1e3a8a; }
.dark .bg-blue-900 { background-color: #1e3a8a; }
.dark .text-blue-600 { color: #60a5fa; }
.dark .text-blue-400 { color: #93c5fd; }
.dark .text-blue-800 { color: #93c5fd; }
.dark .border-blue-500 { border-color: #3b82f6; }

.dark .bg-purple-100 { background-color: #581c87; }
.dark .bg-purple-900 { background-color: #581c87; }
.dark .text-purple-600 { color: #c084fc; }
.dark .text-purple-400 { color: #d8b4fe; }
.dark .text-purple-800 { color: #d8b4fe; }

.dark .bg-orange-100 { background-color: #c2410c; }
.dark .bg-orange-900 { background-color: #c2410c; }
.dark .text-orange-800 { color: #fb923c; }

/* Background Utilities */
.bg-login {
    background: radial-gradient(
        circle at 20% 20%, #fbf6f1 0%, 
        #fff9f3 25%, 
        #fffdf5 40%, 
        #fbf5ec 50%, 
        #ffffff 70%, 
        #ffffff 100%
    );
}

.bg-login-linear {
    background: linear-gradient(to bottom, #fbf6f1, #ffffff);
}

/* Alert Components */
.alert-base {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
    text-align: center;
    border: 1px solid;
}

.alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Dark mode support for alerts */
.dark .alert-danger {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #991b1b;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.dark .alert-success {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

.alert-info {
    background-color: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.dark .alert-info {
    background-color: #1e3a8a;
    color: #93c5fd;
    border-color: #1d4ed8;
}

.alert-warning {
    background-color: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.dark .alert-warning {
    background-color: #92400e;
    color: #fbbf24;
    border-color: #d97706;
}

/* Password Toggle Component */
.password-container {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6b7280;
    z-index: 10;
}

.dark .password-toggle {
    color: #9ca3af;
}

.password-toggle .icon-eye-open { 
    display: none; 
}

.password-toggle .icon-eye-closed { 
    display: block; 
}

.password-container.show-password .password-toggle .icon-eye-open { 
    display: block; 
}

.password-container.show-password .password-toggle .icon-eye-closed { 
    display: none; 
}

/* Logo Component */
.logo-main {
    width: 250px;
    height: auto;
}

/* Table Components */
.table-container {
    background-color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Dark mode support for table */
.dark .table-container {
    background-color: #1f2937;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.table-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.dark .table-header {
    background-color: #374151;
    border-bottom: 1px solid #4b5563;
}

.table-content {
    overflow-x: auto;
}

.table-modern {
    min-width: 100%;
    border-collapse: collapse;
}

.table-modern thead {
    background-color: #f9fafb;
}

.dark .table-modern thead {
    background-color: #374151;
}

.table-modern th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.dark .table-modern th {
    color: #9ca3af;
    border-bottom-color: #4b5563;
}

.table-modern td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

.dark .table-modern td {
    color: #f9fafb;
    border-bottom-color: #4b5563;
}

.table-modern tbody tr {
    background-color: white;
    transition: background-color 0.2s;
}

.dark .table-modern tbody tr {
    background-color: #1f2937;
}

.table-modern tbody tr:hover {
    background-color: #f9fafb;
}

.dark .table-modern tbody tr:hover {
    background-color: #374151;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* Sortable Table Headers */
.sortable-header {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    color: inherit;
    border-radius: 0.25rem;
}

.sortable-header:hover {
    color: #374151;
}

.sortable-header:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1;
}

.sortable-icon {
    visibility: hidden;
    margin-left: 0.5rem;
    color: #9ca3af;
    transition: visibility 0.2s;
}

.sortable-header:hover .sortable-icon,
.sortable-header:focus .sortable-icon {
    visibility: visible;
}

/* Search Component */
.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: white;
    color: #111827;
}

.dark .search-input {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .search-input::placeholder {
    color: #9ca3af;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.dark .search-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.dark .search-icon {
    color: #6b7280;
}

/* Button Components */
.btn-primary {
    background-color: #4f46e5;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1;
}

.btn-secondary {
    background-color: white;
    color: #374151;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.dark .btn-secondary {
    background-color: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

.btn-secondary:hover {
    background-color: #f9fafb;
}

.dark .btn-secondary:hover {
    background-color: #4b5563;
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1;
}

.dark .btn-secondary:focus {
    box-shadow: 0 0 0 2px #818cf8;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-danger:focus {
    outline: none;
    box-shadow: 0 0 0 2px #ef4444;
}

.btn-success {
    background-color: #16a34a;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.btn-success:hover {
    background-color: #15803d;
}

.btn-success:focus {
    outline: none;
    box-shadow: 0 0 0 2px #22c55e;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* Modal Components */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(75, 85, 99, 0.5);
    overflow-y: auto;
    height: 100%;
    width: 100%;
    z-index: 40;
}

.modal-container {
    position: relative;
    top: 5rem;
    margin: 0 auto;
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    width: 91.666667%;
    max-width: 28rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    background-color: white;
}

.dark .modal-container {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .modal-header {
    border-bottom-color: #374151;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.dark .modal-title {
    color: #f9fafb;
}

.modal-close {
    color: #9ca3af;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #6b7280;
}

.dark .modal-close {
    color: #d1d5db;
}

.dark .modal-close:hover {
    color: #f3f4f6;
}

.modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1;
}

.modal-body {
    padding: 1rem 0;
    color: #374151;
}

.dark .modal-body {
    color: #d1d5db;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    gap: 0.5rem;
}

.dark .modal-footer {
    border-top-color: #374151;
}

/* Form Components */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #111827;
}

.dark .form-select {
    background-color: #1f2937;
    border-color: #4b5563;
    color: #f9fafb;
}

.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.dark .form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.2);
}

.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-checkbox {
    height: 1rem;
    width: 1rem;
    color: #6366f1;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
}

.form-checkbox:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-radio {
    height: 1rem;
    width: 1rem;
    color: #6366f1;
    border: 1px solid #d1d5db;
}

.form-radio:focus {
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-help {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Professional Form Container System */
.form-container {
    background-color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 0.75rem;
    padding: 2.5rem 2rem;
    border: 1px solid #f3f4f6;
}

.dark .form-container {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments for desktop two-column layout */
@media (min-width: 1024px) {
    .form-container {
        padding: 3rem 2.5rem;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-icon {
    margin: 0 auto 1rem;
    height: 3rem;
    width: 3rem;
    background-color: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0f2fe;
}

.dark .form-icon {
    background-color: #1e3a8a;
    border-color: #3b82f6;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.dark .form-title {
    color: #f9fafb;
}

.form-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0;
}

.dark .form-subtitle {
    color: #9ca3af;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.dark .form-label {
    color: #d1d5db;
}

.form-required {
    color: #dc2626;
    margin-left: 0.25rem;
}

.dark .form-required {
    color: #f87171;
}

.form-input-container {
    position: relative;
}

.form-input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.dark .form-input-icon i {
    color: #6b7280;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: white;
    color: #111827;
}

.dark .form-input {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.form-input-with-icon {
    padding-left: 2.5rem;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dark .form-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.dark .form-input::placeholder {
    color: #6b7280;
}

.form-select-container {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: white;
    color: #111827;
    appearance: none;
    background-image: none;
}

.dark .form-select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.form-select-with-icon {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.form-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.dark .form-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.form-select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.dark .form-select-arrow i {
    color: #6b7280;
}

.form-help {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1.5;
}

.dark .form-help {
    color: #9ca3af;
}

.form-qr-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    text-align: center;
}

.dark .form-qr-preview {
    background-color: #374151;
    border-color: #4b5563;
}

/* Desktop responsive styles for QR preview */
@media (min-width: 1024px) {
    .form-qr-preview {
        min-height: 20rem;
        justify-content: center;
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        border: 2px dashed #0ea5e9;
    }
}

.form-qr-image {
    width: 8rem;
    height: 8rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Desktop responsive styles for QR image */
@media (min-width: 1024px) {
    .form-qr-image {
        width: 12rem;
        height: 12rem;
        border: 2px solid #0ea5e9;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.dark .form-actions {
    border-top-color: #4b5563;
}

.form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.form-button-primary {
    background-color: #4f46e5;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.form-button-primary:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.form-button-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

.form-button-primary:active {
    transform: translateY(0);
}

.form-button-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-button-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.form-button-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.4);
}

.form-alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-alert-danger {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.dark .form-alert-danger {
    background-color: #7f1d1d;
    color: #fca5a5;
    border-color: #991b1b;
}

.form-alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.dark .form-alert-success {
    background-color: #14532d;
    color: #86efac;
    border-color: #166534;
}

.form-alert-info {
    background-color: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.form-alert-warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* Form Checkbox Components */
.form-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    color: #6366f1;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.form-checkbox:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

/* Form Password Toggle */
.form-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    transition: color 0.2s;
}

.form-password-toggle:hover {
    color: #4b5563;
}

/* Form Input States */
.form-input-readonly {
    background-color: #f9fafb;
    cursor: not-allowed;
}

.form-input-readonly:focus {
    border-color: #d1d5db;
    box-shadow: none;
}

/* Form Conditional Sections */
.form-conditional-section {
    border-left: 3px solid #e5e7eb;
    padding-left: 1rem;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.form-conditional-section[style*="display: none"] {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Form Error State */
.form-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1.5;
    display: none;
}

/* Button Flex Layout */
.form-button:not(:last-child) {
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .form-button:not(:last-child) {
        margin-bottom: 0;
    }
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-processing {
    background-color: #dbeafe;
    color: #1d4ed8;
}

/* Card Components */
.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
}

/* Pagination Components */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: white;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    font-size: 0.875rem;
    color: #374151;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-button {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pagination-button:hover {
    background-color: #f9fafb;
}

.pagination-button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1;
}

.pagination-button.active {
    background-color: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.pagination-button.active:hover {
    background-color: #4338ca;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-button:disabled:hover {
    background-color: white;
}

/* Custom Slider */
.slider-custom {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.5rem;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.slider-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background-color: #4f46e5;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-custom::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #4f46e5;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slider-custom:focus::-webkit-slider-thumb {
    background-color: #4338ca;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.slider-custom:focus::-moz-range-thumb {
    background-color: #4338ca;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Utility Classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-muted {
    color: #6b7280;
}

.border-dashed {
    border-style: dashed;
}

.hover-scale {
    transition: transform 0.2s;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Loading States */
.loading-spinner {
    animation: spin 1s linear infinite;
    height: 1.25rem;
    width: 1.25rem;
    color: #4f46e5;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Table */
.table-responsive {
    overflow-x: auto;
}

@media (max-width: 640px) {
    .table-responsive table {
        min-width: 100%;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .modal-container {
        top: 2rem;
        width: 95%;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
