@font-face {
  font-family: 'ITF Qomra Arabic Bold';
  src: url('../01_zakaria_wan/fonts/itfQomraArabic-Bold.otf') format('opentype');
}

:root {
    --bg-color: #002623;
    --panel-bg: rgba(5, 66, 57, 0.65);
    --border-color: rgba(185, 167, 121, 0.28);
    --text-primary: #edebe0;
    --text-secondary: #b9a779;
    --primary: #988561; 
    --success: #10b981; 
    --warning: #f59e0b; 
    --danger: #ef4444;  
    --critical: #991b1b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'ITF Qomra Arabic Bold', 'Cairo', sans-serif; }

body { background: var(--bg-color); color: var(--text-primary); height: 100vh; overflow: hidden; }

.app-container { display: flex; height: 100vh; width: 100vw; }

.glass-panel {
    background: var(--panel-bg); backdrop-filter: blur(12px); border-left: 1px solid var(--border-color);
}

.dashboard { width: 360px; padding: 24px; display: flex; flex-direction: column; z-index: 10; }
.header { margin-bottom: 25px; text-align: center; }
.logo { max-width: 100%; margin-bottom: 15px; filter: drop-shadow(0 0 10px rgba(185,167,121,0.3)); }
.header h2 { font-size: 18px; color: #e0e7ff; margin-bottom: 5px; }
.header p { font-size: 13px; color: var(--text-secondary); }

.controls { display: flex; flex-direction: column; gap: 15px; flex: 1; }
.btn { padding: 12px; border-radius: 8px; border: none; font-size: 15px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.primary-btn { background: var(--primary); color: white; }
.primary-btn:not(:disabled):hover { background: #b9a779; transform: translateY(-2px); }
.secondary-btn { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.warning-btn { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.danger-btn { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.success-btn { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid var(--success); }

.action-group { margin-top: 10px; border: 1px dashed var(--border-color); padding: 15px; border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.section-title { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 5px; }

.mt-auto { margin-top: auto; }

.split-view {
    flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 25px; padding: 25px; position: relative;
}

.grid-bg {
    position: absolute; inset: 0;
    background-image: url('../01_zakaria_wan/pattern.png');
    background-size: 380px; opacity: 0.2; z-index: 0; pointer-events: none;
}

.view-panel {
    background: rgba(0, 38, 35, 0.85); border: 2px solid var(--border-color);
    border-radius: 16px; display: flex; flex-direction: column; z-index: 1; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.panel-header {
    background: rgba(255,255,255,0.05); padding: 15px 20px; font-size: 16px; font-weight: bold;
    border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: 10px;
}

/* Admin Dashboard Styles */
.admin-view { padding: 0; }
.stats-grid { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.stat-card {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    padding: 15px; border-radius: 12px; text-align: center;
}
.stat-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.stat-number { font-size: 30px; font-weight: bold; margin-bottom: 12px; }
.progress-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.progress { height: 100%; transition: width 1s ease; }
.fill-primary { background: var(--primary); }
.fill-warning { background: var(--warning); }
.fill-danger { background: var(--danger); }
.fill-critical { background: var(--critical); }

.awareness-meter { margin: auto 20px 20px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); padding: 20px; border-radius: 12px; text-align: center; }
.meter-title { font-size: 15px; margin-bottom: 15px; color: var(--text-primary); font-weight: bold; }
.meter-bar { height: 15px; border-radius: 10px; background: rgba(255,255,255,0.1); overflow: hidden; transition: all 0.3s; }
.meter-fill { height: 100%; transition: all 1s ease; }
.meter-label { margin-top: 12px; font-weight: bold; font-size: 14px; }

/* User View Styles */
.email-client { flex: 1; background: #f8fafc; color: #333; display: flex; flex-direction: column; overflow: hidden; font-family: 'Segoe UI', Tahoma, sans-serif; direction: rtl; }
.hidden { display: none !important; }

/* Inbox */
.inbox { flex: 1; display: flex; flex-direction: column; background: white;}
.email-row { padding: 15px 20px; border-bottom: 1px solid #e2e8f0; cursor: pointer; transition: 0.2s; font-size: 15px; font-weight: bold; }
.email-row.empty { color: #94a3b8; text-align: center; margin-top: 50px; border: none; font-weight: normal; cursor: default; }
.email-row:not(.empty):hover { background: #f1f5f9; }
.email-row .subject { color: #0f172a; margin-top: 8px; font-weight: normal; font-size: 14px; }

/* Read Email */
.email-read { padding: 30px; flex: 1; display: flex; flex-direction: column; animation: slideIn 0.3s; background: white; }
.mail-sender { padding-bottom: 15px; border-bottom: 1px solid #e2e8f0; font-size: 15px; position: relative; display: flex; justify-content: space-between;}
.warning-tooltip { background: #fee2e2; color: #ef4444; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; opacity: 0; transition: 0.5s; border: 1px solid #fca5a5;}
.warning-tooltip.show { opacity: 1; animation: flashWarn 2s infinite alternate;}
@keyframes flashWarn { from {box-shadow: 0 0 5px #ef4444;} to{box-shadow: 0 0 15px #ef4444;} }

.mail-subject { font-size: 20px; font-weight: bold; padding: 20px 0; color: #0f172a; }
.mail-body { font-size: 15px; color: #334155; line-height: 1.8; }
.mail-body p { margin-bottom: 15px; }
.phishing-link { display: inline-block; padding: 10px 15px; background: #2563eb; color: white; text-decoration: none; border-radius: 4px; font-weight: bold; margin-bottom: 15px; }
.phishing-link:hover { text-decoration: underline; background: #1d4ed8;}

/* Landing Page */
.landing-page { flex: 1; display: flex; flex-direction: column; align-items: center; animation: slideIn 0.3s; background: white; }
.browser-header { width: 100%; background: #e2e8f0; padding: 10px 15px; font-family: monospace; font-size: 13px; color: #475569; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid #cbd5e1; direction: ltr; }
.login-box { margin-top: 60px; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 360px; text-align: center; border: 1px solid #e2e8f0; }
.login-box img { max-width: 120px; margin-bottom: 25px; }
.login-box h3 { font-size: 18px; margin-bottom: 25px; color: #0f172a; }
.login-box input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; font-size: 14px;}
.login-box input:focus { outline: none; border-color: #2563eb; }
.login-box button { width: 100%; padding: 12px; background: var(--primary); color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 16px; margin-top: 10px;}
.login-box button:hover { background: #b9a779; }

@keyframes slideIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
