/*--------------------------------------------------------------
# Admin Dashboard Styles
--------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }

body.admin-body {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ---- Login Screen ---- */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
}
.admin-login__card {
    background: #fff;
    border-radius: 16px;
    padding: 50px 44px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    text-align: center;
}
.admin-login__logo {
    max-width: 150px;
    margin: 0 auto 24px;
    display: block;
}
.admin-login__card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.admin-login__card p {
    font-size: 14px;
    color: #888;
    margin-bottom: 28px;
}
.admin-login__card input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.admin-login__card input:focus { border-color: #D4AF37; }
.admin-login__card button {
    width: 100%;
    padding: 13px;
    background: #D4AF37;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}
.admin-login__card button:hover { background: #b8952f; }
.admin-login__error {
    display: none;
    color: #e63757;
    font-size: 13px;
    margin-top: 10px;
}

/* ---- Admin Layout ---- */
.admin-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #1a1a2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-sidebar__logo {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.admin-sidebar__logo img { max-width: 130px; }
.admin-sidebar__logo p {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin: 6px 0 0;
}
.admin-sidebar__nav {
    padding: 20px 0;
    flex: 1;
}
.admin-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.admin-sidebar__nav a:hover,
.admin-sidebar__nav a.active {
    background: rgba(212,175,55,0.12);
    color: #D4AF37;
    border-left-color: #D4AF37;
}
.admin-sidebar__nav a i { width: 18px; text-align: center; font-size: 15px; }
.admin-sidebar__footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: rgba(255,255,255,0.35);
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.admin-topbar {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-topbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
.admin-topbar__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}
.btn-admin-primary { background: #D4AF37; color: #fff; }
.btn-admin-primary:hover { background: #b8952f; color: #fff; }
.btn-admin-outline { background: transparent; color: #555; border: 2px solid #ddd; }
.btn-admin-outline:hover { border-color: #D4AF37; color: #D4AF37; }
.btn-admin-danger { background: #e63757; color: #fff; }
.btn-admin-danger:hover { background: #c62040; }
.btn-admin-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-admin-success { background: #00897b; color: #fff; }
.btn-admin-success:hover { background: #00796b; }

/* Content area */
.admin-content { padding: 32px; flex: 1; }

/* Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.admin-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
}
.admin-stat-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.icon-gold { background: rgba(212,175,55,0.15); color: #D4AF37; }
.icon-blue { background: rgba(44,123,229,0.12); color: #2c7be5; }
.icon-red { background: rgba(230,55,87,0.12); color: #e63757; }
.icon-green { background: rgba(0,137,123,0.12); color: #00897b; }
.icon-purple { background: rgba(124,77,255,0.12); color: #7c4dff; }
.admin-stat-card__num {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1;
    margin-bottom: 4px;
}
.admin-stat-card__label { font-size: 13px; color: #888; }

/* Table Card */
.admin-table-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    overflow: hidden;
}
.admin-table-card__header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.admin-table-card__header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}
.admin-search {
    position: relative;
    display: flex;
    align-items: center;
}
.admin-search input {
    padding: 8px 14px 8px 36px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    width: 220px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.admin-search input:focus { border-color: #D4AF37; }
.admin-search i {
    position: absolute;
    left: 12px;
    color: #aaa;
    font-size: 13px;
}

table.admin-table { width: 100%; border-collapse: collapse; }
table.admin-table th {
    padding: 12px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}
table.admin-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #f7f7f7;
    vertical-align: middle;
}
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table tr:hover td { background: #fafbff; }
.admin-table__thumb {
    width: 60px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    background: #eee;
    display: block;
}
.admin-table__no-thumb {
    width: 60px;
    height: 42px;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ccc;
}
.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.admin-badge-awards { background: rgba(212,175,55,0.15); color: #a87e00; }
.admin-badge-workshops { background: rgba(44,123,229,0.12); color: #2c7be5; }
.admin-badge-events { background: rgba(230,55,87,0.12); color: #e63757; }
.admin-badge-meetings { background: rgba(124,77,255,0.12); color: #7c4dff; }
.admin-badge-media { background: rgba(0,150,136,0.12); color: #00897b; }
.admin-badge-default { background: #f0f0f0; color: #666; }

.admin-actions { display: flex; gap: 6px; flex-wrap: nowrap; }
.admin-empty { text-align: center; color: #bbb; padding: 40px; font-size: 15px; }

/* ---- Modal ---- */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}
.admin-modal-overlay.show { display: flex; }
.admin-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.22);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.admin-modal__header {
    padding: 22px 28px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-modal__header h3 { font-size: 18px; font-weight: 700; color: #1a1a2e; margin: 0; }
.admin-modal__close {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #555;
    transition: background 0.2s;
}
.admin-modal__close:hover { background: #eee; }
.admin-modal__body { padding: 28px; }
.admin-modal__footer {
    padding: 18px 28px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Fields */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-group { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    color: #333;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #D4AF37;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: 12px; color: #aaa; margin-top: 4px; }

/* Toast notification */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1a1a2e;
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.3s ease;
}
.admin-toast.show { display: flex; }
.admin-toast.success { border-left: 4px solid #00897b; }
.admin-toast.error { border-left: 4px solid #e63757; }
@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: static; }
    .admin-content { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   MULTI-IMAGE UPLOAD
===================================================== */

/* Drop Zone */
.img-dropzone {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    background: #fafafa;
    position: relative;
    user-select: none;
}
.img-dropzone:hover,
.img-dropzone.dragover {
    border-color: #D4AF37;
    background: rgba(212,175,55,0.05);
}
.img-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
}
.img-dropzone__icon {
    font-size: 36px;
    color: #ddd;
    margin-bottom: 10px;
    transition: color 0.25s;
}
.img-dropzone:hover .img-dropzone__icon,
.img-dropzone.dragover .img-dropzone__icon {
    color: #D4AF37;
}
.img-dropzone__label {
    font-size: 14px;
    font-weight: 600;
    color: #888;
    margin-bottom: 4px;
}
.img-dropzone__sub {
    font-size: 12px;
    color: #bbb;
}
.img-dropzone__sub span {
    color: #D4AF37;
    font-weight: 600;
    cursor: pointer;
}

/* Upload mode badge */
.upload-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
}
.upload-mode-badge.local {
    background: rgba(212,175,55,0.12);
    color: #a87e00;
}
.upload-mode-badge.server {
    background: rgba(0,137,123,0.12);
    color: #00897b;
}

/* Preview Grid */
.img-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.img-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.img-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.img-preview-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    gap: 6px;
}
.img-preview-item:hover .img-preview-item__overlay { opacity: 1; }
.img-preview-remove {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #e63757;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: transform 0.2s;
}
.img-preview-remove:hover { transform: scale(1.1); }
.img-preview-main-badge {
    background: #D4AF37;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Upload progress bar */
.img-upload-progress {
    height: 4px;
    background: #eee;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}
.img-upload-progress__bar {
    height: 100%;
    background: #D4AF37;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}
.img-upload-progress.show { display: block; }

/* Image count badge in table */
.img-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(212,175,55,0.12);
    color: #a87e00;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
}

/* Multi-image thumb strip in table */
.admin-table__thumbs {
    display: flex;
    gap: 4px;
    align-items: center;
}
.admin-table__thumbs img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.admin-table__thumbs .more {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #888;
}
