:root {
    --primary: #0284c7; --primary-light: #e0f2fe; --primary-dark: #0369a1;
    --accent-cyan: #06b6d4; --success: #10b981; --success-dark: #047857;
    --warning: #f59e0b; --bg-color: #f8fafc; --card-bg: #ffffff;
    --text-main: #1e293b; --text-muted: #64748b; --border: #cbd5e1;
    --shadow-sm: 0 2px 8px rgba(2, 132, 199, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.06);
    --radius-lg: 20px; --radius-md: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; padding: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%230284c7' fill-opacity='0.04'%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3Ccircle cx='60' cy='50' r='2'/%3E%3Ccircle cx='100' cy='30' r='4'/%3E%3Ccircle cx='140' cy='60' r='2.5'/%3E%3Cpath d='M20,40 Q40,20 60,40 T100,40' fill='none' stroke='%230284c7' stroke-width='1' stroke-opacity='0.04'/%3E%3Cpath d='M20,50 Q40,70 60,50 T100,50' fill='none' stroke='%2306b6d4' stroke-width='0.8' stroke-opacity='0.04'/%3E%3Cline x1='30' y1='43' x2='30' y2='47' stroke='%230284c7' stroke-width='1' stroke-opacity='0.04'/%3E%3Cline x1='50' y1='37' x2='50' y2='63' stroke='%230284c7' stroke-width='1' stroke-opacity='0.04'/%3E%3Cline x1='70' y1='43' x2='70' y2='47' stroke='%230284c7' stroke-width='1' stroke-opacity='0.04'/%3E%3Cline x1='90' y1='37' x2='90' y2='63' stroke='%230284c7' stroke-width='1' stroke-opacity='0.04'/%3E%3C/g%3E%3C/svg%3E"); }
.container { max-width: 850px; margin: auto; }
.header-container { text-align: center; margin-bottom: 30px; }
.header-title { color: var(--primary-dark); font-size: 26px; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 10px; }
.header-subtitle { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-top: 4px; letter-spacing: 1px; }
.auth-container { max-width: 420px; margin: 40px auto; display: block; }
.auth-card { background: var(--card-bg); padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid #f1f5f9; position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 5px; background: linear-gradient(90deg, var(--primary), var(--accent-cyan)); }
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 25px; }
.auth-tab-btn { flex: 1; padding: 12px; background: transparent; border: none; font-size: 15px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: 0.2s; text-align: center; }
.auth-tab-btn.active { color: var(--primary-dark); border-bottom: 3px solid var(--primary); }
.auth-msg { font-size: 13px; font-weight: 600; text-align: center; margin-bottom: 15px; padding: 8px; border-radius: 8px; display: none; }
.auth-msg.err { background: #fee2e2; color: #b91c1c; }
.auth-msg.ok { background: #d1fae5; color: #065f46; }
#initLoader { text-align: center; margin-top: 100px; }
#initLoader i { color: var(--primary); }
#initLoader p { margin-top: 15px; font-weight: 600; color: var(--text-muted); font-size: 15px; }
.tab-menu { display: flex; background: #e2e8f0; padding: 6px; border-radius: 50px; margin-bottom: 25px; box-shadow: inset 0 2px 4px rgba(0,0,0,0.03); align-items: center; justify-content: center; gap: 6px;}
.tab-btn { flex: 1; background: transparent; color: var(--text-muted); padding: 14px 20px; font-weight: 700; border-radius: 50px; cursor: pointer; border: none; font-size: 14px; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; }
.tab-btn.active { background-color: var(--card-bg); color: var(--primary-dark); box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05); }
.card { background: var(--card-bg); padding: 30px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); margin-bottom: 25px; border: 1px solid #f1f5f9; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent-cyan)); }
.card-title { font-weight: 800; font-size: 17px; color: var(--text-main); margin-bottom: 20px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.card-title i { color: var(--primary); }
.radio-group { display: flex; gap: 15px; margin-bottom: 20px; justify-content: center; align-items: center; }
.radio-group label { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 22px; background: #f1f5f9; border-radius: 50px; color: var(--text-main); font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: 0.2s; height: 40px; }
.radio-group input[type="radio"] { display: none; }
.radio-group label:has(input:checked) { background: var(--primary-light); color: var(--primary-dark); border-color: #bae6fd; box-shadow: var(--shadow-sm); }
.search-input-group { display: flex; gap: 10px; align-items: center; width: 100%; }
input[type="text"], input[type="password"], select, textarea { padding: 14px 18px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-size: 16px !important; color: var(--text-main); transition: all 0.2s ease; background: #f8fafc; font-family: inherit; width: 100%; }
input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12); }
.input-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; width: 100%; }
.input-box label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 5px; }
.input-box label i { color: var(--primary); }
button.btn-search { padding: 14px 24px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; border-radius: var(--radius-md); cursor: pointer; font-weight: 700; font-size: 15px; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2); white-space: nowrap !important; }
button.btn-action { background: linear-gradient(135deg, var(--success), var(--success-dark)); width: 100%; padding: 16px; border-radius: var(--radius-md); font-size: 15px; font-weight: 700; color: white; border: none; cursor: pointer; transition: 0.2s; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }
button.btn-auth { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); width: 100%; padding: 14px; border-radius: var(--radius-md); color: white; border: none; cursor: pointer; font-weight: 700; font-size: 16px; transition: 0.2s; }
button:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.grid-2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.info-item { background: linear-gradient(180deg, #ffffff, #f8fafc); padding: 16px; border-radius: var(--radius-md); border: 1.5px solid #e2e8f0; display: flex; flex-direction: column; justify-content: center; }
.info-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 800; margin-bottom: 5px; }
.info-value { display: block; font-size: 15px; font-weight: 700; color: var(--text-main); word-break: break-word; }
.history-card { background: var(--card-bg); border-radius: var(--radius-lg); padding: 30px; margin-bottom: 30px; box-shadow: var(--shadow-md); border: 1px solid #f1f5f9; position: relative; overflow: hidden; }
.history-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--warning), #fbbf24); }
.history-section { margin-top: 25px; padding-top: 20px; border-top: 1.5px dashed var(--border); }
.history-log { background: #fafafa; padding: 18px; font-size: 14.5px; border-radius: var(--radius-md); border: 1px solid var(--border); max-height: 250px; overflow-y: auto; color: #334155; line-height: 1.8; }
.log-entry { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed #cbd5e1; }
.log-entry:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.log-date { color: #0369a1; font-weight: 700; background: #e0f2fe; padding: 3px 8px; border-radius: 6px; font-size: 12.5px; margin-right: 6px; display: inline-block; }
.log-user { color: #047857; font-weight: 800; }
.log-vol { color: #be123c; font-weight: 800; background: #ffe4e6; padding: 2px 8px; border-radius: 6px; }
.log-init { font-weight: 800; color: #b45309; }
.user-badge { font-size: 13px; font-weight: 600; color: var(--primary-dark); margin-bottom: 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.role-badge { padding: 3px 10px; border-radius: 12px; color: white; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.role-admin { background: var(--success); }
.role-staff { background: #64748b; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 9999; align-items: center; justify-content: center; padding: 15px; }
.modal-card { background: var(--card-bg); max-width: 400px; width: 100%; padding: 25px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid #f1f5f9; position: relative; overflow: hidden; }
.modal-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent-cyan)); }

@media (max-width: 650px) {
    body { padding: 8px; }
    .header-title { font-size: 16px; } 
    .card, .history-card { padding: 12px; }
    .user-badge { font-size: 12px; }
    .tab-btn, .radio-group label, button.btn-search { padding: 10px; font-size: 13px; }
    .grid-2col { grid-template-columns: 1fr; gap: 8px; }
}