:root {
    --navy: #0d2a4a;
    --navy-light: #15406e;
    --gold: #d9a441;
    --bg: #eef1f5;
    --white: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e1e6ec;
    --red: #c0392b;
    --green: #1e8449;
}

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

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(130deg, var(--navy), var(--navy-light));
}

.login-box {
    background: var(--white);
    padding: 40px 36px;
    border-radius: 14px;
    width: 360px;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    text-align: center;
}

.login-brand {
    background: var(--gold);
    color: var(--navy);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 16px;
}

.login-box h1 { color: var(--navy); font-size: 22px; }
.login-box .sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.login-box label { display: block; text-align: left; font-size: 14px; margin: 12px 0 6px; font-weight: 600; }

.login-box input,
.form-card input,
.form-card textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover { background: var(--navy-light); }
.login-box .btn-primary { width: 100%; margin-top: 22px; }

.alert { padding: 11px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert.error { background: #fdecea; color: var(--red); }
.alert.success { background: #e8f6ee; color: var(--green); }

.admin-header { background: var(--navy); color: var(--white); }
.admin-header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-header .logo { font-weight: 700; letter-spacing: .5px; }
.header-right { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.header-right a { color: #d7e0ea; text-decoration: none; }
.header-right a:hover { color: var(--gold); }
.header-right .logout { color: var(--gold); }
.header-right .user { color: #b9c6d6; }

.admin-main { max-width: 1140px; margin: 30px auto; padding: 0 20px; }
.admin-main.narrow { max-width: 640px; }

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-head h1, .admin-main.narrow h1 { color: var(--navy); font-size: 26px; }
.admin-main.narrow h1 { margin-bottom: 20px; }

.data-table {
    width: 100%;
    background: var(--white);
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.05);
}
.data-table th, .data-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { background: #f7f9fb; color: var(--muted); font-size: 13px; text-transform: uppercase; }
.thumb { width: 80px; height: 56px; object-fit: cover; border-radius: 6px; }
.badge { background: #eef3f9; color: var(--navy-light); padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }

.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.btn-edit, .btn-delete {
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}
.btn-edit { background: #eaf0f6; color: var(--navy); }
.btn-delete { background: #fdecea; color: var(--red); }
.btn-edit:hover { background: #dde6f0; }
.btn-delete:hover { background: #f9d9d5; }

.empty {
    background: var(--white);
    padding: 50px;
    text-align: center;
    color: var(--muted);
    border-radius: 10px;
}

.form-card { background: var(--white); padding: 26px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.form-card label { display: block; font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
.form-card label:first-child { margin-top: 0; }
.form-card .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.preview { width: 100%; max-height: 240px; object-fit: cover; border-radius: 8px; }

.form-actions { display: flex; gap: 12px; margin-top: 22px; }
.btn-cancel { background: #eef1f5; color: var(--text); padding: 12px 22px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.btn-cancel:hover { background: #e1e6ec; }

@media (max-width: 700px) {
    .data-table thead { display: none; }
    .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
    .data-table tr { margin-bottom: 14px; border-radius: 10px; background: var(--white); }
    .data-table td { border: none; border-bottom: 1px solid var(--border); }
}
