@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root { 
    --primary: #ff7e5f; /* Sunset Coral */
    --primary-hover: #eb5f3f; 
    --bg-color: transparent; 
    --surface: rgba(255, 255, 255, 0.9); /* Frosted Glass */
    --border: rgba(255, 255, 255, 0.4); 
    --text: #1e293b; 
    --muted: #64748b; 
    --warning: #f59e0b; 
    --success: #10b981; 
    --danger: #ef4444;
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Outfit', system-ui, -apple-system, sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

/* Beautiful Beach Sunset Background from Unsplash */
body { 
    background: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.6)), 
                url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=80') no-repeat center center fixed;
    background-size: cover;
    color: var(--text); 
    padding: 30px 20px; 
    display: flex; 
    justify-content: center; 
    flex-direction: column; 
    align-items: center; 
    min-height: 100vh;
}

.container { 
    width: 100%; 
    max-width: 1000px; 
    transition: max-width 0.3s ease;
}

body.is-admin .container {
    max-width: 98vw;
    padding-left: 10px;
    padding-right: 10px;
}

/* Glassmorphism Card Effect */
.card { 
    background: var(--surface); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border); 
    border-radius: 16px; 
    padding: 30px; 
    box-shadow: var(--shadow); 
    margin-bottom: 25px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

.hidden { display: none !important; }
h2 { margin-bottom: 20px; color: var(--text); font-weight: 700; letter-spacing: -0.5px;}
h3 { margin-bottom: 16px; color: var(--primary); font-weight: 600; }

/* Sunset Gradient Buttons */
.btn { 
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%); 
    color: #fff; 
    border: none; 
    padding: 14px 20px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: 600; 
    transition: all 0.3s ease; 
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
    min-height: 48px; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn:hover { 
    background: linear-gradient(135deg, #eb5f3f 0%, #fca35b 100%);
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(255, 126, 95, 0.6); 
}
.btn:active { transform: translateY(0); }

.btn-secondary { background: rgba(241, 245, 249, 0.9); color: var(--text); box-shadow: none; border: 1px solid #cbd5e1;}
.btn-secondary:hover { background: #e2e8f0; transform: translateY(-2px);}
.btn-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);}
.btn-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);}
.btn-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);}

/* Forms & Inputs */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #334155; }
input[type="text"], input[type="password"], input[type="date"], select { 
    width: 100%; padding: 14px 14px; 
    border: 1.5px solid #cbd5e1; border-radius: 8px; 
    font-size: 16px; 
    outline: none; 
    background: rgba(255, 255, 255, 0.8); 
    transition: all 0.3s ease;
    min-height: 48px;
}
input:focus, select:focus { 
    border-color: var(--primary); 
    background: #ffffff; 
    box-shadow: 0 0 0 4px rgba(255, 126, 95, 0.15); 
}
input:disabled, select:disabled { background: rgba(226, 232, 240, 0.8); color: #334155 !important; font-weight: 600 !important; cursor: not-allowed; border-color: transparent;}
.input-error { border-color: var(--danger) !important; background-color: #fef2f2 !important; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;}

.dual-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 18px; }

/* Tabs */
.nav-tabs { display: flex; gap: 8px; margin-bottom: 25px; border-bottom: 2px solid rgba(226, 232, 240, 0.5); padding-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab { padding: 12px 20px; border: none; background: transparent; cursor: pointer; font-weight: 600; color: var(--muted); border-radius: 8px; white-space: nowrap; transition: all 0.3s; font-size: 15px;}
.nav-tab:hover { background: rgba(255, 255, 255, 0.5); color: var(--text); }
.nav-tab.active { background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%); color: #fff; box-shadow: 0 4px 10px rgba(255, 126, 95, 0.3);}

/* Tables */
.table-wrapper { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); -webkit-overflow-scrolling: touch; background: rgba(255,255,255,0.7);}
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 600px;}
.table th { background: rgba(248, 250, 252, 0.9); font-weight: 600; color: #475569; text-transform: uppercase; font-size: 12px; letter-spacing: 0.5px; white-space: nowrap;}
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--border); text-align: left; }

.excel-grid-wrapper { overflow-x: auto; max-width: 100%; background: rgba(255,255,255,0.9); border: 1px solid var(--border); border-radius: 8px; }
.excel-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 13px; }
.excel-table th, .excel-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; white-space: nowrap; }
.excel-table th { background: rgba(241, 245, 249, 0.9); position: sticky; top: 0; font-weight: 600;}

.radio-group { display: flex; gap: 24px; margin: 15px 0; flex-wrap: wrap;}
.radio-label { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; color: #334155; min-height: 44px;}
.radio-label input[type="radio"] { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer;}

.top-bar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.stage-indicator { font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%); display: inline-block; padding: 6px 12px; border-radius: 20px; box-shadow: 0 2px 5px rgba(255, 126, 95, 0.3);}
.action-row { display: flex; gap: 12px; margin-top: 25px; padding-top: 20px; border-top: 1px solid rgba(226, 232, 240, 0.5); justify-content: space-between; align-items: center;}

.doc-row { display: flex; justify-content: space-between; align-items: center; padding: 16px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; background: rgba(255,255,255,0.8); box-shadow: 0 1px 2px rgba(0,0,0,0.02);}
.doc-status { font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(241, 245, 249, 0.9); padding: 4px 10px; border-radius: 12px;}
.doc-status.done { color: var(--success); background: #dcfce7;}

.price-box { background: linear-gradient(135deg, rgba(255, 126, 95, 0.1) 0%, rgba(254, 180, 123, 0.2) 100%); border: 1px solid rgba(255, 126, 95, 0.3); color: #c2410c; padding: 15px; border-radius: 8px; text-align: center; font-size: 15px; font-weight: 700; margin-bottom: 20px; box-shadow: inset 0 2px 4px rgba(255,255,255,0.5);}
.balance-badge { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: bold; margin-top: 8px; display: inline-block; box-shadow: 0 2px 4px rgba(217, 119, 6, 0.3);}

.timer-badge {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 12px; background: #fef3c7; color: #92400e; white-space: nowrap;
}
.timer-badge.expired { background: #fee2e2; color: #991b1b; }
.timer-badge.uploaded { background: #dcfce7; color: #166534; }

#crop-modal, #video-modal, #view-doc-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(8px); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; padding: 20px;}
.crop-container { width: 100%; max-width: 600px; height: 60vh; background: #000; margin-bottom: 20px; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);}
#global-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); z-index: 99999; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: auto; }
.spinner { border: 4px solid #e2e8f0; border-top: 4px solid var(--primary); border-radius: 50%; width: 50px; height: 50px; animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite; margin-bottom: 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.hindi-field { display: none !important; }

@media (max-width: 768px) {
    body { padding-top: 10px; padding-left: 10px; padding-right: 10px; }
    .card { padding: 20px 15px; border-radius: 12px; }
    .dual-row { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
    .action-row { flex-direction: column-reverse; gap: 10px; }
    .action-row button, .action-row div { width: 100%; display: flex; gap: 10px; justify-content: center;}
    .action-row div button { flex: 1; }
    .top-bar { flex-direction: column; gap: 15px; }
    .doc-row { flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px;}
    .doc-row > div:last-child { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px;}
    .doc-row > div:last-child button { width: 100%; }
    .nav-tab { padding: 10px 14px; font-size: 14px; }
    h2 { font-size: 20px; }
    h3 { font-size: 16px; }
}