/* ==========================================================================
   QASYS Theme — Soran University Quality Assurance System
   Adapted from the Staff Portal template (navy + gold).
   RTL-aware. Include on every page: <link rel="stylesheet" href="/QAnew/assets/css/qasys-theme.css">
   ========================================================================== */

:root {
    --primary:        #1e3a5f;
    --primary-light:  #2c5282;
    --primary-dark:   #16293f;
    --secondary:      #d4af37;   /* gold  */
    --accent:         #e67e22;   /* orange */
    --success:        #2f9e44;
    --danger:         #e03131;
    --warning:        #f08c00;
    --text-dark:      #1a202c;
    --text-light:     #718096;
    --bg-light:       #f7fafc;
    --border:         #e2e8f0;
    --white:          #ffffff;
    --shadow:    0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
    --radius:    14px;
}

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

body {
    font-family: 'Inter', 'Noto Sans Arabic', Tahoma, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
    min-height: 100vh;
}
/* Kurdish / Arabic headings keep a clean sans, latin headings use Playfair */
h1, h2, h3, h4 { font-family: 'Playfair Display', 'Noto Sans Arabic', serif; color: var(--primary); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4 {
    font-family: 'Noto Sans Arabic', 'Tajawal', sans-serif;
}

a { text-decoration: none; }

/* ---------- Top navbar ---------- */
.qa-navbar {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(10px);
    padding: .9rem 4%;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: var(--shadow);
}
.qa-logo { display: flex; align-items: center; gap: .9rem; }
.qa-logo-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 1.2rem; overflow: hidden;
}
.qa-logo-icon img { width: 100%; height: 100%; object-fit: contain; }
.qa-logo-text h1 { font-size: 1.2rem; line-height: 1.1; }
.qa-logo-text span { font-size: .7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 2px; }
.qa-nav-links { display: flex; gap: 1.8rem; list-style: none; align-items: center; }
.qa-nav-links a { color: var(--text-dark); font-weight: 500; font-size: .95rem; position: relative; transition: color .3s; }
.qa-nav-links a::after {
    content: ''; position: absolute; bottom: -6px; inset-inline-start: 0;
    width: 0; height: 2px; background: var(--secondary); transition: width .3s;
}
.qa-nav-links a:hover::after { width: 100%; }
.qa-nav-links a:hover { color: var(--primary); }
.qa-nav-actions { display: flex; align-items: center; gap: .8rem; }
.qa-user-chip { display: flex; align-items: center; gap: .6rem; color: var(--text-light); font-size: .9rem; }
.qa-user-chip i { color: var(--secondary); }

/* ---------- Buttons ---------- */
.btn {
    padding: .7rem 1.4rem; border: none; border-radius: 8px; font-weight: 600;
    cursor: pointer; transition: all .3s; display: inline-flex; align-items: center; gap: .5rem;
    font-size: .95rem; font-family: inherit;
}
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover   { background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); color:#fff; }
.btn-secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-gold      { background: var(--secondary); color: var(--primary-dark); }
.btn-gold:hover{ filter: brightness(1.05); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-danger    { background: var(--danger); color:#fff; }
.btn-danger:hover { filter: brightness(1.05); }
.btn-success   { background: var(--success); color:#fff; }
.btn-block     { width: 100%; justify-content: center; }
.btn-sm        { padding: .45rem .9rem; font-size: .85rem; }

/* ---------- Layout shell ---------- */
.qa-container { max-width: 1200px; margin: 0 auto; padding: 2.5rem 4%; }
.qa-page-head { margin-bottom: 2rem; }
.qa-page-head h2 { font-size: 2rem; margin-bottom: .4rem; }
.qa-page-head p  { color: var(--text-light); }

/* ---------- Hero / welcome banner ---------- */
.qa-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 55%, #1a365d 100%);
    color: #fff; padding: 3rem 4%; position: relative; overflow: hidden;
}
.qa-hero::before {
    content: ''; position: absolute; top: -50%; inset-inline-end: -10%;
    width: 420px; height: 420px; background: rgba(212,175,55,.12); border-radius: 50%;
    animation: qa-float 20s infinite ease-in-out;
}
@keyframes qa-float { 0%,100%{transform:translate(0,0) rotate(0)} 50%{transform:translate(30px,40px) rotate(180deg)} }
.qa-hero-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.qa-hero h2 { color: #fff; font-size: 2.4rem; margin-bottom: .6rem; }
.qa-hero p  { opacity: .9; font-size: 1.1rem; }
.qa-hero .qa-season-tag {
    display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem;
    background: rgba(255,255,255,.15); padding: .5rem 1rem; border-radius: 30px;
    font-size: .9rem; border: 1px solid rgba(255,255,255,.25);
}

/* ---------- Stat cards ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); text-align: center; transition: transform .3s; }
.stat-card:hover { transform: translateY(-5px); }
.stat-number { font-size: 2.4rem; font-weight: 700; color: var(--primary); font-family: 'Playfair Display', sans-serif; }
.stat-label  { color: var(--text-light); font-weight: 500; margin-top: .3rem; }

/* ---------- Dashboard action cards ---------- */
.qa-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1.6rem; }
.qa-card {
    background: var(--white); border-radius: 20px; padding: 2rem 1.6rem; box-shadow: var(--shadow);
    transition: all .4s cubic-bezier(.4,0,.2,1); text-align: center; position: relative; overflow: hidden;
    border-top: 4px solid transparent;
}
.qa-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-top-color: var(--secondary); }
.qa-card .qa-card-icon {
    width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem;
}
.qa-card.gold  .qa-card-icon { background: linear-gradient(135deg, var(--secondary) 0%, #b8941f 100%); color: var(--primary-dark); }
.qa-card.accent .qa-card-icon{ background: linear-gradient(135deg, var(--accent) 0%, #c85a0e 100%); }
.qa-card h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.qa-card p  { color: var(--text-light); font-size: .9rem; margin-bottom: 1.2rem; min-height: 2.4em; }

/* ---------- Generic panel / surface ---------- */
.qa-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem; margin-bottom: 1.6rem; }
.qa-panel h3 { margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.qa-panel h3 i { color: var(--secondary); }

/* ---------- Forms ---------- */
.qa-form-group { margin-bottom: 1.1rem; }
.qa-form-group label { display: block; font-weight: 600; margin-bottom: .4rem; color: var(--text-dark); }
.qa-form-group .req { color: var(--danger); }
.qa-input, .qa-select, .qa-textarea {
    width: 100%; padding: .8rem 1rem; border: 2px solid var(--border); border-radius: 10px;
    font-size: 1rem; font-family: inherit; transition: border-color .3s; background: #fff;
}
.qa-input:focus, .qa-select:focus, .qa-textarea:focus { outline: none; border-color: var(--primary); }

/* ---------- Tables ---------- */
.qa-table-wrap { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table.qa-table { width: 100%; border-collapse: collapse; }
table.qa-table thead th {
    background: var(--primary); color: #fff; padding: .9rem 1rem; text-align: start; font-weight: 600; font-size: .9rem;
}
table.qa-table tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
table.qa-table tbody tr:nth-child(even) { background: var(--bg-light); }
table.qa-table tbody tr:hover { background: #eef3f9; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: .3rem .8rem; border-radius: 30px; font-size: .78rem; font-weight: 600; }
.badge-yes  { background: #d3f9d8; color: #2b8a3e; }
.badge-no   { background: #ffe3e3; color: #c92a2a; }
.badge-wait { background: #fff3bf; color: #b07d00; }
.badge-gold { background: #fbf2d3; color: #8a6d1a; }
.badge-open { background:#d3f9d8; color:#2b8a3e; }
.badge-closed{ background:#ffe3e3; color:#c92a2a; }

/* ---------- Alerts ---------- */
.qa-alert { padding: 1rem 1.2rem; border-radius: 10px; margin-bottom: 1rem; font-weight: 500; }
.qa-alert-success { background: #d3f9d8; color: #2b8a3e; }
.qa-alert-danger  { background: #ffe3e3; color: #c92a2a; }
.qa-alert-info    { background: #d0ebff; color: #1971c2; }
.qa-alert-warning { background: #fff3bf; color: #b07d00; }

/* ---------- Login card ---------- */
.qa-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, #16293f 100%); }
.qa-login-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 2.6rem; width: 100%; max-width: 420px; text-align: center; }
.qa-login-card img.logo { width: 96px; margin-bottom: 1rem; }
.qa-login-card h1 { font-size: 1.5rem; margin-bottom: 1.4rem; }
.qa-divider { display: flex; align-items: center; gap: 1rem; color: var(--text-light); margin: 1.2rem 0; font-size: .85rem; }
.qa-divider::before, .qa-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- Footer ---------- */
.qa-footer { background: var(--primary-dark); color: rgba(255,255,255,.8); text-align: center; padding: 1.6rem; margin-top: 3rem; font-size: .9rem; }
.qa-footer a { color: var(--secondary); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: all .6s ease; }
.reveal.show { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2,1fr) !important; }
    .qa-nav-links { display: none; }
}
@media (max-width: 560px) {
    .stats-grid { grid-template-columns: repeat(2,1fr) !important; }
    .qa-hero h2 { font-size: 1.7rem; }
    .qa-container { padding: 1.6rem 4%; }
}
@media (max-width: 360px) {
    .stats-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Radio choices (quick approve/reject) ---------- */
.qa-radio-row{display:flex;gap:.8rem;flex-wrap:wrap}
.qa-radio{flex:1;min-width:150px;display:flex;align-items:center;justify-content:center;gap:.5rem;
  padding:.8rem 1rem;border:2px solid var(--border);border-radius:12px;cursor:pointer;
  font-weight:600;color:var(--text-dark);transition:all .15s;background:var(--white)}
.qa-radio input{accent-color:var(--primary);width:18px;height:18px}
.qa-radio:hover{border-color:var(--primary-light)}
.qa-radio-yes:has(input:checked){border-color:#2f9e44;background:#eaf6ee;color:#1b6b32}
.qa-radio-no:has(input:checked){border-color:#e03131;background:#fdecec;color:#a51111}
