:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #64748B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #0EA5E9;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --radius: 16px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 1rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.btn-admin {
    padding: 0.4rem 1rem;
    background: var(--primary);
    color: white !important;
    border-radius: 8px;
}

/* UI Components */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-info {
    background: #E0F2FE;
    color: #075985;
    border: 1px solid #BAE6FD;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/* Premium Form Group */
.form-group-premium {
    background: #F1F5F9;
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.form-group-premium:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.form-group-premium label {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-premium select,
.form-group-premium input {
    background: white;
    border: 2px solid #E2E8F0;
    height: 60px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 14px;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
}

.btn-block {
    width: 100%;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

/* Custom Searchable Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-input {
    width: 100%;
    height: 60px !important;
    padding-left: 3rem !important;
    background: white !important;
    border: 2px solid #E2E8F0 !important;
    border-radius: 14px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    animation: fadeIn 0.2s ease-out;
}

.custom-select-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid #F1F5F9;
}

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

.custom-select-item:hover {
    background: #F1F5F9;
    color: var(--primary);
    padding-left: 1.75rem;
}

.custom-select-item.no-results {
    color: var(--text-muted);
    font-style: italic;
    cursor: default;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* QR Section */
.qr-container {
    text-align: center;
    padding: 2rem;
    background: #f1f5f9;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.qr-image {
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    background: white;
    padding: 1rem;
    box-shadow: var(--shadow);
}

/* Progress Bar */
.progress-container {
    height: 12px;
    background: #E2E8F0;
    border-radius: 20px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--success);
    transition: width 0.5s ease-in-out;
}

/* Status Grid */
.status-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.status-item {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.status-item:hover {
    background: white;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #DCFCE7;
    color: #166534;
}

.badge-danger {
    background: #FEE2E2;
    color: #991B1B;
}

/* Dashboard Cards */
.grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .status-list {
        grid-template-columns: 1fr;
    }
}