:root {
    --bg-primary: #0a1628;
    --bg-secondary: rgba(255, 255, 255, 0.03);
    --gold: #c6a867;
    --gold-light: rgba(198, 168, 103, 0.15);
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.25);
    --emerald: #10b981;
    --emerald-light: rgba(16, 185, 129, 0.15);
    --blue: #3b82f6;
    --blue-light: rgba(59, 130, 246, 0.15);
    --red: #ef4444;
    --border: rgba(255, 255, 255, 0.06);
}

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

body {
    font-family: 'IBM Plex Sans Arabic', 'Amiri', sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #0d1f35 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

#root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 22, 40, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.2), rgba(198, 168, 103, 0.1));
    border: 1px solid rgba(198, 168, 103, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.moon-icon {
    width: 20px;
    height: 20px;
    color: var(--gold);
}

.brand-text h1 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.brand-text p {
    font-size: 10px;
    color: rgba(198, 168, 103, 0.4);
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-mutakif {
    background: var(--emerald-light);
    color: var(--emerald);
    border-color: rgba(16, 185, 129, 0.15);
}

.btn-mutakif:hover {
    background: rgba(16, 185, 129, 0.25);
}

.btn-register {
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.2), rgba(198, 168, 103, 0.15));
    color: var(--gold);
    border-color: rgba(198, 168, 103, 0.2);
}

.btn-register:hover {
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.3), rgba(198, 168, 103, 0.25));
}

.btn-admin {
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.2);
}

.btn-admin:hover {
    color: rgba(198, 168, 103, 0.6);
}

.btn-lang {
    padding: 0.5rem;
}

/* Main */
.main {
    flex: 1;
    padding: 1.5rem 1rem;
}

.container {
    max-width: 672px;
    margin: 0 auto;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.2), rgba(198, 168, 103, 0.1));
    border: 1px solid rgba(198, 168, 103, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(198, 168, 103, 0.2);
}

.hero-logo svg {
    width: 40px;
    height: 40px;
    color: var(--gold);
}

.hero-title {
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.ornament {
    width: 128px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1.25rem auto 0;
    opacity: 0.3;
}

.ornament-sm {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 1rem auto;
    opacity: 0.3;
}

/* Status Card */
.status-card {
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.status-open {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

.status-closed {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    background: var(--emerald);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px var(--emerald);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: var(--emerald);
    font-size: 12px;
    font-weight: 700;
}

.timer {
    font-size: 3rem;
    font-weight: 900;
    font-family: 'Readex Pro', monospace;
    color: var(--gold);
    letter-spacing: 0.1em;
    margin: 1rem 0;
}

.progress-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    overflow: hidden;
    max-width: 240px;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), #fbbf24);
    border-radius: 9999px;
    transition: width 1s ease;
    box-shadow: 0 0 20px rgba(198, 168, 103, 0.3);
}

.count-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.status-closed-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--red);
    font-size: 12px;
    font-weight: 700;
}

.status-closed-text svg {
    width: 16px;
    height: 16px;
}

/* Approved Section */
.approved-section {
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.section-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
}

.star-icon {
    width: 16px;
    height: 16px;
    color: var(--gold);
}

.mutakifin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .mutakifin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mutakif-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.mutakif-card:hover {
    border-color: rgba(198, 168, 103, 0.2);
}

.mutakif-photo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(198, 168, 103, 0.15);
}

.mutakif-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.1), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-placeholder svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.15);
}

.mutakif-info {
    flex: 1;
    min-width: 0;
}

.mutakif-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.mutakif-phone,
.mutakif-area {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.mutakif-phone {
    color: rgba(255, 255, 255, 0.4);
}

.mutakif-phone svg {
    width: 12px;
    height: 12px;
    color: var(--emerald);
    opacity: 0.5;
}

.mutakif-area {
    color: rgba(198, 168, 103, 0.5);
}

.mutakif-area svg {
    width: 12px;
    height: 12px;
    color: var(--gold);
    opacity: 0.5;
}

/* Action Cards */
.action-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    border-color: rgba(198, 168, 103, 0.25);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon svg {
    width: 28px;
    height: 28px;
}

.action-icon-mutakif {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.action-icon-register {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.action-text {
    flex: 1;
    text-align: right;
}

.action-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.action-text p {
    font-size: 11px;
    color: var(--text-muted);
}

.action-arrow {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.action-card:hover .action-arrow {
    color: rgba(198, 168, 103, 0.5);
}

.badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--gold), #fbbf24);
    color: #1a1207;
    font-size: 9px;
    font-weight: 900;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 4px 15px rgba(198, 168, 103, 0.3);
    z-index: 10;
}

.badge-new svg {
    width: 10px;
    height: 10px;
}

/* Footer */
.footer {
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.1), transparent);
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-icon.gold {
    background: linear-gradient(135deg, rgba(198, 168, 103, 0.2), rgba(198, 168, 103, 0.1));
    border: 1px solid rgba(198, 168, 103, 0.2);
    color: var(--gold);
}

.modal-icon.emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--emerald);
}

.modal-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--blue);
}

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

.modal-body {
    padding: 1.5rem;
}

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

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.375rem;
}

.form-label svg {
    width: 12px;
    height: 12px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(198, 168, 103, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .form-input {
    padding-left: 2.5rem;
}

.toggle-password {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.25rem;
}

.toggle-password:hover {
    color: rgba(255, 255, 255, 0.5);
}

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

.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--gold), #b8941d);
    color: #1a1207;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(198, 168, 103, 0.3);
}

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

.btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0.5rem;
}

.btn-close:hover {
    color: rgba(255, 255, 255, 0.6);
}

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

.error-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red);
    padding: 0.75rem;
    border-radius: 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.error-banner svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.link-text {
    font-size: 11px;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 1rem;
}

.link-text a {
    color: rgba(198, 168, 103, 0.7);
    text-decoration: none;
    font-weight: 700;
}

.link-text a:hover {
    color: var(--gold);
}

/* Camera */
.camera-container {
    margin-bottom: 1rem;
}

.camera-preview {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.camera-preview video {
    width: 100%;
    display: block;
}

.camera-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.btn-camera {
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--gold), #b8941d);
    color: #1a1207;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

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

.btn-ghost {
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
}

.photo-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.photo-btn {
    width: 112px;
    height: 112px;
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.photo-btn:hover {
    border-color: rgba(198, 168, 103, 0.3);
}

.photo-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-btn svg {
    width: 28px;
    height: 28px;
    color: rgba(255, 255, 255, 0.15);
}

.photo-btn:hover svg {
    color: rgba(198, 168, 103, 0.4);
}

.photo-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.photo-btn:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay svg {
    width: 24px;
    height: 24px;
    color: white;
}

.hint-box {
    background: rgba(198, 168, 103, 0.05);
    border: 1px solid rgba(198, 168, 103, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
}

.hint-box svg {
    width: 14px;
    height: 14px;
    color: rgba(198, 168, 103, 0.6);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.hint-box p {
    font-size: 11px;
    color: rgba(198, 168, 103, 0.5);
    line-height: 1.5;
}

.age-badge {
    display: inline-block;
    margin-top: 0.375rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--emerald);
    font-size: 11px;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
}

/* Spinner */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 18, 7, 0.3);
    border-top-color: #1a1207;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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