/* ============================================================
   Hi-Tech Lab — Admin / Staff Portal Design System
   Shared stylesheet for login, dashboards, and management tools.
   Dark teal glass UI, IBM Plex Sans Thai + IBM Plex Mono.
   ============================================================ */

:root {
    --teal-900: #002f2f;
    --teal-800: #004040;
    --teal-700: #006a6a;
    --teal-600: #00897a;
    --teal-500: #00a3a3;
    --teal-200: #99e0e0;
    --teal-50:  #e6fafa;
    --white:    #ffffff;
    --gray-100: #f4f6f6;
    --gray-300: #d0d8d8;
    --gray-500: #7a9090;
    --gray-900: #111c1c;

    --green: #34c759;
    --green-dim: rgba(52,199,89,0.15);
    --green-text: #6fdb8a;

    --red: #ff453a;
    --red-dim: rgba(255,69,58,0.15);
    --red-text: #ff8a82;

    --amber: #ffc107;
    --amber-dim: rgba(255,193,7,0.15);
    --amber-text: #ffd55a;

    --blue: #6495ed;
    --blue-dim: rgba(100,149,237,0.15);
    --blue-text: #99b8f5;

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-2xl: 20px;

    --shadow-panel: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    --shadow-card: 0 20px 60px rgba(0,0,0,0.4);
    --font-th: 'IBM Plex Sans Thai', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-th);
    background: var(--teal-900);
    min-height: 100vh;
    color: var(--teal-50);
}

a { color: inherit; }

/* ===== Background atmosphere (grid + glow) ===== */
.bg-grid {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,163,163,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,163,163,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0,163,163,0.15) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   TOP BAR (logged-in pages)
   ============================================================ */
.topbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 28px;
    background: rgba(0,40,40,0.55);
    border-bottom: 1px solid rgba(0,163,163,0.18);
    backdrop-filter: blur(16px);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.topbar-logo {
    width: 38px; height: 38px;
    border-radius: 10px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    flex-shrink: 0;
}
.topbar-logo img { width: 100%; height: 100%; object-fit: cover; }
.topbar-logo i { color: white; font-size: 16px; }

.topbar-titles { line-height: 1.3; }
.topbar-titles .t-main { font-size: 15px; font-weight: 700; color: var(--white); }
.topbar-titles .t-sub { font-size: 11px; color: var(--teal-200); opacity: 0.75; font-family: var(--font-mono); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
    font-family: var(--font-mono);
    border: 1px solid rgba(0,163,163,0.25);
    background: rgba(0,163,163,0.08);
    color: var(--teal-200);
    white-space: nowrap;
}
.chip i { font-size: 11px; }
.chip.role-admin { border-color: rgba(255,193,7,0.3); background: var(--amber-dim); color: var(--amber-text); }
.chip.role-user  { border-color: rgba(100,149,237,0.3); background: var(--blue-dim); color: var(--blue-text); }

.icon-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,163,163,0.2);
    color: var(--gray-500);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.icon-btn:hover { background: rgba(0,163,163,0.12); color: var(--teal-200); border-color: rgba(0,163,163,0.4); }
.icon-btn.logout:hover { background: var(--red-dim); color: var(--red-text); border-color: rgba(255,69,58,0.3); }

/* Breadcrumb */
.breadcrumb {
    position: relative; z-index: 1;
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    font-family: var(--font-mono);
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--teal-200); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--teal-200); }

/* ============================================================
   AUTH PANEL (login / register style centered card)
   ============================================================ */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

.panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(0, 50, 50, 0.6);
    border: 1px solid rgba(0,163,163,0.25);
    border-radius: var(--radius-2xl);
    padding: 40px 36px 32px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-panel);
    animation: fadeUp 0.5s ease both;
}

.panel-header { text-align: center; margin-bottom: 28px; }

.panel-logo {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0,163,163,0.35);
    overflow: hidden;
}
.panel-logo img { width: 100%; height: 100%; object-fit: cover; }
.panel-logo i { font-size: 24px; color: white; }

.panel-title { font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: -0.3px; }
.panel-subtitle {
    font-size: 13px; color: var(--teal-200); opacity: 0.7;
    font-family: var(--font-mono); margin-top: 4px;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 500; line-height: 1.5;
    margin-bottom: 20px;
    animation: fadeUp 0.3s ease both;
}
.alert i { margin-top: 1px; flex-shrink: 0; }
.alert-success { background: var(--green-dim); border: 1px solid rgba(52,199,89,0.3); color: var(--green-text); }
.alert-error   { background: var(--red-dim);   border: 1px solid rgba(255,69,58,0.3);  color: var(--red-text); }
.alert-info    { background: rgba(0,163,163,0.1); border: 1px solid rgba(0,163,163,0.25); color: var(--teal-200); }
.alert-warning { background: var(--amber-dim); border: 1px solid rgba(255,193,7,0.3); color: var(--amber-text); }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 12px; font-weight: 600;
    color: var(--teal-200);
    font-family: var(--font-mono);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.required { color: var(--red-text); margin-left: 3px; }

.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500); font-size: 14px; pointer-events: none;
}

.form-input,
.form-select,
textarea.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,163,163,0.2);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-th);
    color: var(--white);
    transition: all 0.2s;
    outline: none;
}
.input-wrap .form-input { padding: 13px 42px; }

.form-input::placeholder { color: var(--gray-500); }
.form-input:focus, .form-select:focus {
    border-color: rgba(0,163,163,0.6);
    background: rgba(0,163,163,0.08);
    box-shadow: 0 0 0 3px rgba(0,163,163,0.1);
}

textarea.form-input { min-height: 120px; resize: vertical; }

.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.form-input[type=number] { -moz-appearance: textfield; }

.char-count { text-align: right; font-size: 12px; color: var(--gray-500); margin-top: 5px; font-family: var(--font-mono); }

.toggle-pw {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500); cursor: pointer; font-size: 14px;
    transition: color 0.2s; background: none; border: none;
}
.toggle-pw:hover { color: var(--teal-200); }

.field-hint { font-size: 12px; color: var(--gray-500); margin-top: 6px; line-height: 1.5; }
.field-error { font-size: 12px; color: var(--red-text); margin-top: 6px; display: flex; align-items: center; gap: 5px; }

/* Checkbox / options row */
.options-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; font-size: 13px; flex-wrap: wrap; gap: 10px;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; color: var(--gray-500); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--teal-500); cursor: pointer; }
.text-link { color: var(--gray-500); text-decoration: none; transition: color 0.2s; }
.text-link:hover { color: var(--teal-200); }

/* Strength meter */
.strength-meter { display: flex; gap: 4px; margin-top: 8px; }
.strength-bar { height: 4px; flex: 1; border-radius: 2px; background: rgba(255,255,255,0.08); transition: background 0.25s; }
.strength-label { font-size: 11px; color: var(--gray-500); margin-top: 6px; font-family: var(--font-mono); }

/* File upload */
.file-upload-input { display: none; }
.file-upload-label {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(0,163,163,0.35);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--teal-200);
    font-size: 14px; font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}
.file-upload-label:hover { background: rgba(0,163,163,0.08); border-color: rgba(0,163,163,0.6); }
.file-upload-label i { font-size: 18px; }

.image-preview { margin-top: 14px; display: none; }
.image-preview img { max-width: 100%; max-height: 280px; border-radius: var(--radius-md); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
.image-info { margin-top: 6px; font-size: 12px; color: var(--gray-500); font-family: var(--font-mono); }

.current-image-wrap {
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-md); padding: 14px;
    text-align: center; margin-top: 10px;
}
.current-image-wrap img { max-width: 100%; max-height: 260px; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    padding: 12px 24px;
    border: none; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600;
    font-family: var(--font-th);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-block { width: 100%; }
.btn-lg { padding: 13px; font-size: 15px; }

.btn-primary {
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    color: white;
    box-shadow: 0 4px 16px rgba(0,163,163,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,163,163,0.4); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(0,163,163,0.2);
    color: var(--gray-500);
}
.btn-secondary:hover { background: rgba(0,163,163,0.1); color: var(--teal-200); }

.btn-back {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,163,163,0.2);
    color: var(--gray-500);
}
.btn-back:hover { background: rgba(0,163,163,0.1); color: var(--teal-200); }

.btn-danger {
    background: var(--red-dim);
    border: 1px solid rgba(255,69,58,0.3);
    color: var(--red-text);
}
.btn-danger:hover { background: rgba(255,69,58,0.25); }

.btn-danger-solid {
    background: linear-gradient(135deg, #ff453a, #c82333);
    color: white;
    box-shadow: 0 4px 16px rgba(255,69,58,0.3);
}
.btn-danger-solid:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,69,58,0.4); }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-sm); }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.form-actions .btn-primary { flex: 1; min-width: 160px; }

/* Spinner for loading state */
.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ============================================================
   DASHBOARD MENU (Admin.php / users.php)
   ============================================================ */
.menu { display: flex; flex-direction: column; gap: 10px; }

.menu-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--teal-50);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0,163,163,0.12);
    font-size: 15px; font-weight: 500;
    transition: all 0.2s ease;
    animation: fadeUp 0.5s ease both;
}
.menu-item:nth-child(1) { animation-delay: 0.04s; }
.menu-item:nth-child(2) { animation-delay: 0.08s; }
.menu-item:nth-child(3) { animation-delay: 0.12s; }
.menu-item:nth-child(4) { animation-delay: 0.16s; }
.menu-item:nth-child(5) { animation-delay: 0.20s; }
.menu-item:nth-child(6) { animation-delay: 0.24s; }

.menu-item:hover {
    background: rgba(0,163,163,0.15);
    border-color: rgba(0,163,163,0.4);
    color: var(--white);
    transform: translateX(4px);
}

.menu-item-text { display: flex; flex-direction: column; gap: 1px; }
.menu-item-text .label { font-weight: 600; }
.menu-item-text .desc { font-size: 12px; color: var(--gray-500); font-weight: 400; }

.menu-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.icon-edit    { background: rgba(0,163,163,0.2);  color: var(--teal-200); }
.icon-add     { background: var(--green-dim); color: var(--green-text); }
.icon-delete  { background: var(--red-dim); color: var(--red-text); }
.icon-lecture { background: var(--amber-dim); color: var(--amber-text); }
.icon-meeting { background: var(--blue-dim); color: var(--blue-text); }
.icon-users   { background: rgba(186,104,255,0.15); color: #c89bff; }

.menu-arrow { margin-left: auto; font-size: 12px; color: var(--gray-500); transition: transform 0.2s ease; }
.menu-item:hover .menu-arrow { transform: translateX(3px); color: var(--teal-200); }

/* Stat cards (dashboard summary) */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.stat-card {
    background: rgba(0,50,50,0.5);
    border: 1px solid rgba(0,163,163,0.18);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    animation: fadeUp 0.4s ease both;
}
.stat-card .stat-label { font-size: 11px; color: var(--gray-500); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--white); margin-top: 4px; }
.stat-card .stat-value i { font-size: 16px; color: var(--teal-500); margin-right: 6px; }

/* ============================================================
   PAGE LAYOUT (wide pages: news mgmt, lecture, meeting, schedule)
   ============================================================ */
.page-wrap {
    position: relative; z-index: 1;
    max-width: 1100px; margin: 0 auto;
    padding: 28px 24px 60px;
    animation: fadeUp 0.5s ease both;
}
.page-wrap.narrow { max-width: 860px; }

.page-header {
    display: flex; align-items: center; gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.page-header-text { flex: 1; min-width: 200px; }

.header-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white; flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0,163,163,0.35);
}
.header-icon.danger { background: linear-gradient(135deg, #ff6b6b, #c82333); box-shadow: 0 8px 24px rgba(255,69,58,0.35); }

.header-text h1 { font-size: 22px; font-weight: 700; color: var(--white); }
.header-text p  { font-size: 13px; color: var(--teal-200); opacity: 0.7; font-family: var(--font-mono); margin-top: 3px; }

.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Cards */
.card {
    background: rgba(0,50,50,0.6);
    border: 1px solid rgba(0,163,163,0.25);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}
.card.compact { padding: 24px; }

.divider { height: 1px; background: rgba(0,163,163,0.15); margin: 24px 0; }

/* Toolbar (search + filter + actions row) */
.toolbar {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px; flex-wrap: wrap;
}
.toolbar .search-wrap { position: relative; flex: 1; min-width: 220px; }
.toolbar .search-wrap i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--gray-500); font-size: 14px;
}
.toolbar .search-wrap input { padding-left: 40px; }

/* ============================================================
   TABLE
   ============================================================ */
.table-card {
    background: rgba(0,50,50,0.6);
    border: 1px solid rgba(0,163,163,0.25);
    border-radius: var(--radius-xl);
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}
.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead th {
    background: rgba(0,163,163,0.2);
    color: var(--teal-200);
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 600;
    letter-spacing: 0.8px; text-transform: uppercase;
    padding: 14px 22px; text-align: left;
    border-bottom: 1px solid rgba(0,163,163,0.25);
    white-space: nowrap;
}

tbody tr { border-bottom: 1px solid rgba(0,163,163,0.1); transition: background 0.15s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(0,163,163,0.07); }

tbody td {
    padding: 15px 22px;
    color: var(--teal-50);
    font-size: 14px;
    vertical-align: middle;
}

.td-id { font-family: var(--font-mono); color: var(--gray-500); font-size: 13px; }
.td-title { font-weight: 500; line-height: 1.5; }
.td-date { font-family: var(--font-mono); font-size: 13px; color: var(--teal-200); white-space: nowrap; }
.td-chapter { font-family: var(--font-mono); font-size: 12px; color: var(--gray-500); }
.td-action { text-align: right; white-space: nowrap; }
.td-thumb { width: 56px; }
.td-thumb img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; display: block; }
.td-thumb .no-thumb {
    width: 48px; height: 48px; border-radius: 8px;
    background: rgba(255,255,255,0.04);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-500); font-size: 14px;
}

.row-actions { display: inline-flex; gap: 6px; }

.btn-download, .btn-check {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px; font-weight: 600;
    font-family: var(--font-mono);
    transition: all 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
}
.btn-download { background: rgba(0,163,163,0.15); border-color: rgba(0,163,163,0.35); color: var(--teal-200); }
.btn-download:hover { background: rgba(0,163,163,0.28); border-color: rgba(0,163,163,0.6); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,163,163,0.25); }

.btn-check { background: var(--amber-dim); border-color: rgba(255,193,7,0.3); color: var(--amber-text); }
.btn-check:hover { background: rgba(255,193,7,0.22); border-color: rgba(255,193,7,0.5); color: var(--white); transform: translateY(-1px); }

.row-schedule td { border-top: 1px solid rgba(0,163,163,0.2); }
.row-schedule .td-title { color: var(--teal-200); font-weight: 600; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-500);
}
.empty-state i { font-size: 32px; color: rgba(0,163,163,0.4); margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* Meta info bar (id / created date strip) */
.news-meta {
    display: flex; gap: 24px; flex-wrap: wrap;
    background: rgba(0,163,163,0.08);
    border: 1px solid rgba(0,163,163,0.2);
    border-radius: var(--radius-md); padding: 14px 18px;
    margin-bottom: 24px;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--gray-500); font-family: var(--font-mono); text-transform: uppercase; }
.meta-value { font-size: 14px; color: var(--teal-50); font-weight: 500; }

/* Info card (bullet list with icons, e.g. schedule notes) */
.info-card {
    background: rgba(0, 50, 50, 0.6);
    border: 1px solid rgba(0,163,163,0.2);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    backdrop-filter: blur(20px);
    display: flex; flex-direction: column; gap: 10px;
    margin-bottom: 20px;
}
.info-row { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--teal-50); }
.info-row i { color: var(--teal-500); width: 18px; flex-shrink: 0; margin-top: 2px; }
.info-row strong { color: var(--teal-200); margin-right: 6px; }

/* Warning note */
.warning-note {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 12px 14px;
    background: var(--amber-dim);
    border: 1px solid rgba(255,193,7,0.2);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 13px; color: var(--amber-text); line-height: 1.5;
}
.warning-note i { margin-top: 2px; flex-shrink: 0; }

/* Confirm modal (used for delete confirmation) */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,15,15,0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    width: 100%; max-width: 420px;
    background: rgba(0,45,45,0.95);
    border: 1px solid rgba(255,69,58,0.3);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    animation: fadeUp 0.25s ease both;
}
.modal-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--red-dim);
    color: var(--red-text);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 16px;
}
.modal-box h3 { font-size: 17px; color: var(--white); margin-bottom: 8px; }
.modal-box p { font-size: 14px; color: var(--gray-500); line-height: 1.6; margin-bottom: 20px; }
.modal-box .news-preview {
    display: flex; gap: 12px; align-items: center;
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 20px;
}
.modal-box .news-preview img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.modal-box .news-preview .no-thumb { width: 44px; height: 44px; border-radius: 8px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: var(--gray-500); flex-shrink: 0; }
.modal-box .news-preview .pv-title { font-size: 13px; color: var(--teal-50); font-weight: 500; line-height: 1.4; }
.modal-box .news-preview .pv-id { font-size: 11px; color: var(--gray-500); font-family: var(--font-mono); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .stat-grid { grid-template-columns: 1fr; }
    .topbar { padding: 14px 18px; }
    .topbar-titles .t-sub { display: none; }
}

@media (max-width: 600px) {
    .page-wrap { padding: 20px 16px 48px; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
    tbody td, thead th { padding: 12px 14px; font-size: 13px; }
    .td-action { text-align: left; }
    .panel { padding: 32px 24px 28px; }
    .header-text h1 { font-size: 19px; }
}
