/* ── ADMIN CSS VARIABLES ── */
:root {
  --teal:       #0b7b6e;
  --teal-light: #14a89a;
  --teal-pale:  #e6f4f3;
  --amber:      #e07b2e;
  --navy:       #1a2e44;
  --slate:      #4a6274;
  --mist:       #f3f6f9;
  --white:      #ffffff;
  --border:     #dde4ec;
  --text:       #2c3e50;
  --text-light: #637384;
  --danger:     #e53e3e;
  --success:    #38a169;
  --warning:    #d69e2e;
  --sidebar-w:  260px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; color: var(--text); background: var(--mist); min-height: 100vh; }

/* ── LOGIN ── */
.login-screen { position: fixed; inset: 0; background: linear-gradient(135deg, var(--navy), var(--teal)); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.login-box { background: white; border-radius: 20px; padding: 40px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--teal), var(--teal-light)); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 12px; }
.login-logo h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--navy); }
.login-logo p  { font-size: 0.82rem; color: var(--text-light); margin-top: 4px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--slate); margin-bottom: 6px; }
.login-field input { width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 14px; font-size: 0.92rem; font-family: inherit; outline: none; transition: border-color .2s; }
.login-field input:focus { border-color: var(--teal); }
.login-btn { width: 100%; background: var(--teal); color: white; border: none; border-radius: 10px; padding: 13px; font-size: 0.95rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .2s; }
.login-btn:hover { background: var(--teal-light); }
.login-hint  { text-align: center; font-size: 0.78rem; color: var(--text-light); margin-top: 12px; }
.login-error { background: #fee; border: 1px solid #fcc; border-radius: 8px; padding: 10px 14px; font-size: 0.83rem; color: var(--danger); margin-bottom: 14px; display: none; }

/* ── LAYOUT ── */
.layout { display: flex; min-height: 100vh; }

/* ── SIDEBAR ── */
.sidebar { width: var(--sidebar-w); background: var(--navy); position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 50; display: flex; flex-direction: column; }
.sidebar-logo { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar-logo .icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--teal), var(--teal-light)); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.sidebar-logo .name { color: white; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.sidebar-logo .sub  { color: rgba(255,255,255,.45); font-size: 0.72rem; }
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.35); margin: 16px 8px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: rgba(255,255,255,.7); font-size: 0.87rem; transition: all .2s; cursor: pointer; border: none; background: none; width: 100%; font-family: inherit; margin-bottom: 2px; }
.nav-item:hover  { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: rgba(20,168,154,.25); color: var(--teal-light); }
.nav-item .icon  { font-size: 1rem; width: 22px; text-align: center; }
.nav-item .badge { margin-left: auto; background: var(--amber); color: white; font-size: 0.68rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }
.sidebar-bottom { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.user-info { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; }
.user-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--teal), var(--teal-light)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.user-text .name { color: white; font-size: 0.83rem; font-weight: 500; }
.user-text .role { color: rgba(255,255,255,.45); font-size: 0.72rem; }
.logout-btn { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; color: rgba(255,255,255,.55); font-size: 0.83rem; cursor: pointer; border: none; background: none; width: 100%; font-family: inherit; transition: all .2s; margin-top: 4px; }
.logout-btn:hover { background: rgba(229,62,62,.15); color: #fc8181; }

/* ── MAIN ── */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.topbar-admin { background: white; border-bottom: 1px solid var(--border); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; }
.topbar-admin h1 { font-size: 1.1rem; font-weight: 600; color: var(--navy); }
.topbar-right-admin { display: flex; align-items: center; gap: 14px; }
.topbar-btn { background: var(--teal-pale); color: var(--teal); border: none; padding: 8px 16px; border-radius: 8px; font-size: 0.83rem; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 6px; text-decoration: none; transition: background .2s; }
.topbar-btn:hover { background: #c8eeeb; }
.content { padding: 28px; flex: 1; }

/* ── PANELS ── */
.panel { display: none; }
.panel.active { display: block; }

/* ── DASHBOARD STATS ── */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 28px; }
.stat-card { background: white; border-radius: 14px; padding: 22px; border: 1px solid var(--border); display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.stat-icon.teal   { background: var(--teal-pale); }
.stat-icon.amber  { background: #fdf0e6; }
.stat-icon.purple { background: #f0e6fd; }
.stat-icon.green  { background: #e6f4ec; }
.stat-num    { font-size: 1.7rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-label  { font-size: 0.82rem; color: var(--text-light); margin-top: 3px; }
.stat-change { font-size: 0.75rem; color: var(--success); margin-top: 2px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

/* ── CARD ── */
.card { background: white; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { font-size: 0.95rem; font-weight: 600; color: var(--navy); }
.card-btn { font-size: 0.78rem; color: var(--teal); font-weight: 500; background: none; border: none; cursor: pointer; font-family: inherit; }
.card-body { padding: 18px 22px; }

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; }
th { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--text-light); padding: 8px 12px; text-align: left; background: var(--mist); }
td { font-size: 0.87rem; color: var(--text); padding: 11px 12px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--mist); }

/* ── BADGES ── */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.badge-green  { background: #d4edda; color: #155724; }
.badge-amber  { background: #fff3cd; color: #856404; }
.badge-red    { background: #f8d7da; color: #721c24; }
.badge-blue   { background: #d1ecf1; color: #0c5460; }

/* ── ACTIVITY ── */
.activity-item { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.activity-dot  { width: 10px; height: 10px; border-radius: 50%; background: var(--teal-light); margin-top: 5px; flex-shrink: 0; }
.activity-text { font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.activity-time { font-size: 0.75rem; color: var(--text-light); }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-header h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--navy); }

/* ── FORM CARD ── */
.form-card { background: white; border-radius: 14px; border: 1px solid var(--border); padding: 28px; margin-bottom: 20px; }
.form-card h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 0; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; color: var(--slate); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 13px; font-size: 0.88rem; font-family: inherit; outline: none; transition: border-color .2s; background: var(--white); color: var(--text); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--teal); }
.form-group.full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.btn-save   { background: var(--teal); color: white; border: none; padding: 10px 24px; border-radius: 9px; font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: background .2s; }
.btn-save:hover { background: var(--teal-light); }
.btn-cancel { background: var(--mist); color: var(--slate); border: none; padding: 10px 20px; border-radius: 9px; font-size: 0.9rem; font-weight: 500; cursor: pointer; font-family: inherit; }
.btn-add    { background: var(--teal); color: white; border: none; padding: 9px 18px; border-radius: 9px; font-size: 0.83rem; font-weight: 600; cursor: pointer; font-family: inherit; display: flex; align-items: center; gap: 6px; }
.btn-delete { background: #fee; color: var(--danger); border: none; padding: 5px 11px; border-radius: 7px; font-size: 0.78rem; cursor: pointer; font-family: inherit; }
.btn-edit   { background: var(--teal-pale); color: var(--teal); border: none; padding: 5px 11px; border-radius: 7px; font-size: 0.78rem; cursor: pointer; font-family: inherit; }

/* ── SEARCH BAR ── */
.search-bar { display: flex; gap: 12px; margin-bottom: 20px; }
.search-bar input  { flex: 1; border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 14px; font-size: 0.88rem; font-family: inherit; outline: none; }
.search-bar input:focus { border-color: var(--teal); }
.search-bar select { border: 1.5px solid var(--border); border-radius: 9px; padding: 10px 14px; font-size: 0.88rem; font-family: inherit; outline: none; background: white; }

/* ── PROGRAMARI FILTERS ── */
.prog-filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.prog-filter { background: var(--mist); border: none; color: var(--slate); padding: 7px 16px; border-radius: 20px; font-size: 0.82rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: all .2s; }
.prog-filter.active { background: var(--teal); color: white; }

/* ── DOCUMENTS ── */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doc-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.doc-icon { font-size: 2.5rem; }
.doc-card h4 { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.doc-card p  { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }
.doc-actions { display: flex; gap: 8px; margin-top: auto; }
.doc-btn { flex: 1; border: none; padding: 8px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; cursor: pointer; font-family: inherit; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.doc-btn.view     { background: var(--teal-pale); color: var(--teal); }
.doc-btn.download { background: var(--mist); color: var(--slate); }

/* ── TOAST ── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: white; padding: 14px 22px; border-radius: 12px; font-size: 0.88rem; z-index: 9000; animation: slideUp .3s ease; box-shadow: 0 8px 28px rgba(0,0,0,.25); font-family: 'DM Sans', sans-serif; }
@keyframes slideUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform:none; } }

/* ── RESPONSIVE ── */
@media(max-width:1024px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .row-2     { grid-template-columns: 1fr; }
  .doc-grid  { grid-template-columns: 1fr 1fr; }
}
@media(max-width:768px) {
  .main { margin-left: 0; }
  .sidebar { transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
}
