/* =========================================================
   EAST WEST PLC — ADMIN PORTAL
   admin.css
========================================================= */

/* =========================================================
   ROOT VARIABLES
========================================================= */

:root {
    --primary: #0F382C;
    --primary-dark: #08211A;
    --primary-light: #1B5E46;

    --accent: #D4AF37;
    --accent-hover: #B59226;

    --bg: #F4F6F8;
    --surface: #FFFFFF;

    --text: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    --border: #E2E8F0;

    --success: #16A34A;
    --success-bg: #DCFCE7;

    --danger: #DC2626;
    --danger-bg: #FEE2E2;

    --warning: #D97706;
    --warning-bg: #FEF3C7;

    --info: #2563EB;
    --info-bg: #DBEAFE;

    --shadow-sm:
        0 1px 3px rgba(15, 23, 42, 0.08);

    --shadow-md:
        0 5px 15px rgba(15, 23, 42, 0.08);

    --shadow-lg:
        0 15px 35px rgba(15, 23, 42, 0.12);

    --sidebar-width: 260px;

    --transition:
        all 0.25s ease;
}


/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}


/* =========================================================
   LOGIN
========================================================= */

.login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background:
        linear-gradient(
            135deg,
            rgba(15, 56, 44, 0.97),
            rgba(8, 33, 26, 0.98)
        );
}

.login-card {
    width: 100%;
    max-width: 430px;

    background: var(--surface);

    padding: 42px;

    border-radius: 14px;

    box-shadow: var(--shadow-lg);
}


/* Logo */

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo-icon {
    width: 65px;
    height: 65px;

    margin: 0 auto 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary);
    color: var(--accent);

    font-size: 28px;
}

.login-logo h1 {
    font-family: "Playfair Display", serif;

    color: var(--primary);

    font-size: 1.8rem;

    line-height: 1.1;

    margin-bottom: 5px;
}

.login-logo span {
    display: block;

    color: var(--text-muted);

    font-size: 0.68rem;

    letter-spacing: 1.2px;

    font-weight: 600;
}


/* Login heading */

.login-heading {
    margin-bottom: 25px;
}

.login-heading h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-heading p {
    color: var(--text-muted);
    font-size: 0.9rem;
}


/* =========================================================
   FORM CONTROLS
========================================================= */

.form-control {
    margin-bottom: 18px;
}

.form-control label {
    display: block;

    margin-bottom: 7px;

    font-size: 0.82rem;

    font-weight: 600;

    color: var(--text);
}

.form-control input,
.form-control select,
.form-control textarea {
    width: 100%;

    padding: 11px 13px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: var(--surface);

    color: var(--text);

    outline: none;

    font-size: 0.9rem;

    transition: var(--transition);
}

.form-control textarea {
    resize: vertical;
    min-height: 90px;
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
    border-color: var(--primary-light);

    box-shadow:
        0 0 0 3px rgba(27, 94, 70, 0.1);
}


/* Input with icon */

.input-wrapper {
    position: relative;
}

.input-wrapper > i {
    position: absolute;

    left: 13px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--text-light);

    pointer-events: none;
}

.input-wrapper input {
    padding-left: 40px;
    padding-right: 45px;
}

.password-toggle {
    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: var(--text-muted);

    font-size: 0.95rem;
}

.password-toggle:hover {
    color: var(--primary);
}


/* =========================================================
   BUTTONS
========================================================= */

.admin-btn {
    border: none;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 11px 17px;

    border-radius: 6px;

    font-size: 0.85rem;

    font-weight: 600;

    transition: var(--transition);
}

.admin-btn-primary {
    background: var(--primary);
    color: #fff;
}

.admin-btn-primary:hover {
    background: var(--primary-light);

    transform: translateY(-1px);
}

.admin-btn-secondary {
    background: #E2E8F0;
    color: var(--text);
}

.admin-btn-secondary:hover {
    background: #CBD5E1;
}

.admin-btn-danger {
    background: var(--danger);
    color: #fff;
}

.admin-btn-danger:hover {
    background: #B91C1C;
}

.admin-btn-accent {
    background: var(--accent);
    color: #000;
}

.admin-btn-accent:hover {
    background: var(--accent-hover);
}

.login-btn {
    width: 100%;

    padding: 13px;

    margin-top: 5px;
}


/* =========================================================
   LOGIN MESSAGES
========================================================= */

.form-message {
    padding: 10px 12px;

    border-radius: 6px;

    font-size: 0.82rem;

    margin-bottom: 15px;
}

.error-message {
    background: var(--danger-bg);
    color: var(--danger);

    border: 1px solid #FECACA;
}

.success-message {
    background: var(--success-bg);
    color: var(--success);

    border: 1px solid #BBF7D0;
}


/* =========================================================
   LOGIN FOOTER
========================================================= */

.login-footer {
    text-align: center;

    margin-top: 25px;

    padding-top: 20px;

    border-top: 1px solid var(--border);
}

.login-footer a {
    color: var(--primary);

    font-size: 0.85rem;

    font-weight: 600;
}

.login-footer a:hover {
    color: var(--accent-hover);
}


/* =========================================================
   DASHBOARD LAYOUT
========================================================= */

.dashboard-section {
    min-height: 100vh;

    display: flex;
}

.admin-sidebar {
    width: var(--sidebar-width);

    position: fixed;

    top: 0;
    left: 0;
    bottom: 0;

    background: var(--primary-dark);

    color: #fff;

    display: flex;
    flex-direction: column;

    z-index: 1000;

    transition: var(--transition);
}


/* =========================================================
   SIDEBAR BRAND
========================================================= */

.sidebar-brand {
    height: 82px;

    padding: 0 20px;

    display: flex;
    align-items: center;

    gap: 11px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary);

    color: var(--accent);

    font-size: 18px;
}

.sidebar-brand h2 {
    font-family: "Playfair Display", serif;

    font-size: 1.1rem;

    line-height: 1;
}

.sidebar-brand span {
    display: block;

    color: rgba(255,255,255,0.55);

    font-size: 0.58rem;

    letter-spacing: 1px;

    margin-top: 5px;
}


/* =========================================================
   SIDEBAR NAV
========================================================= */

.sidebar-nav {
    flex: 1;

    overflow-y: auto;

    padding: 18px 12px;
}

.nav-section-title {
    color: rgba(255,255,255,0.38);

    font-size: 0.65rem;

    font-weight: 700;

    letter-spacing: 1.3px;

    padding: 13px 10px 7px;
}

.sidebar-link {
    width: 100%;

    border: none;

    background: transparent;

    color: rgba(255,255,255,0.7);

    display: flex;

    align-items: center;

    gap: 11px;

    padding: 10px 12px;

    margin-bottom: 3px;

    border-radius: 6px;

    font-size: 0.83rem;

    text-align: left;

    transition: var(--transition);
}

.sidebar-link i {
    width: 18px;

    text-align: center;

    font-size: 0.9rem;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.07);

    color: #fff;
}

.sidebar-link.active {
    background: var(--primary-light);

    color: #fff;

    box-shadow:
        inset 3px 0 0 var(--accent);
}


/* Notification badge */

.notification-badge {
    margin-left: auto;

    min-width: 20px;
    height: 20px;

    padding: 0 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: var(--accent);

    color: #000;

    font-size: 0.65rem;

    font-weight: 700;
}


/* Sidebar bottom */

.sidebar-bottom {
    padding: 12px;

    border-top:
        1px solid rgba(255,255,255,0.08);
}

.logout-link:hover {
    background: rgba(220, 38, 38, 0.18);

    color: #FCA5A5;
}


/* =========================================================
   MAIN ADMIN AREA
========================================================= */

.admin-main {
    margin-left: var(--sidebar-width);

    width: calc(100% - var(--sidebar-width));

    min-width: 0;
}


/* =========================================================
   TOPBAR
========================================================= */

.admin-topbar {
    min-height: 82px;

    background: var(--surface);

    border-bottom: 1px solid var(--border);

    padding: 15px 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    position: sticky;

    top: 0;

    z-index: 900;
}

.topbar-left {
    display: flex;

    align-items: center;

    gap: 15px;
}

.topbar-left h1 {
    font-size: 1.35rem;

    margin-bottom: 2px;
}

.topbar-left p {
    color: var(--text-muted);

    font-size: 0.75rem;
}

.sidebar-toggle {
    display: none;

    border: none;

    background: transparent;

    color: var(--primary);

    font-size: 1.2rem;
}


/* User */

.admin-user {
    display: flex;

    align-items: center;

    gap: 10px;
}

.admin-user-icon {
    width: 38px;
    height: 38px;

    border-radius: 50%;

    background: var(--primary);

    color: var(--accent);

    display: flex;

    align-items: center;
    justify-content: center;
}

.admin-user-info strong {
    display: block;

    font-size: 0.8rem;
}

.admin-user-info span {
    display: block;

    color: var(--text-muted);

    font-size: 0.68rem;
}


/* =========================================================
   CONTENT
========================================================= */

.admin-content {
    padding: 30px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;

    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   SECTION INTRO
========================================================= */

.section-intro {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 25px;
}

.section-label {
    display: block;

    color: var(--accent-hover);

    font-size: 0.65rem;

    font-weight: 700;

    letter-spacing: 1.5px;

    margin-bottom: 4px;
}

.section-intro h2 {
    font-family: "Playfair Display", serif;

    font-size: 1.8rem;

    color: var(--primary);

    margin-bottom: 3px;
}

.section-intro p {
    color: var(--text-muted);

    font-size: 0.82rem;
}


/* =========================================================
   STAT CARDS
========================================================= */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 25px;
}

.stat-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 9px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 15px;

    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 48px;
    height: 48px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    font-size: 1.1rem;
}

.products-icon {
    background: #E8F5EE;
    color: var(--primary);
}

.gallery-icon {
    background: #F3E8FF;
    color: #7E22CE;
}

.message-icon {
    background: #DBEAFE;
    color: #2563EB;
}

.quotation-icon {
    background: #FEF3C7;
    color: #B45309;
}

.stat-content span {
    display: block;

    color: var(--text-muted);

    font-size: 0.72rem;

    margin-bottom: 2px;
}

.stat-content strong {
    display: block;

    color: var(--primary);

    font-size: 1.55rem;
}


/* =========================================================
   ADMIN CARDS
========================================================= */

.admin-grid-2 {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;

    margin-bottom: 22px;
}

.admin-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 9px;

    padding: 22px;

    box-shadow: var(--shadow-sm);

    margin-bottom: 22px;
}

.card-header {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}

.card-header h3 {
    font-size: 1rem;

    color: var(--primary);

    margin-bottom: 3px;
}

.card-header p {
    color: var(--text-muted);

    font-size: 0.72rem;
}


/* =========================================================
   QUICK ACTIONS
========================================================= */

.quick-actions {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}

.quick-action {
    border: 1px solid var(--border);

    background: var(--surface);

    border-radius: 7px;

    padding: 16px;

    display: flex;

    align-items: center;

    gap: 10px;

    color: var(--primary);

    font-size: 0.8rem;

    font-weight: 600;

    transition: var(--transition);
}

.quick-action:hover {
    background: #F8FAFC;

    border-color: var(--primary-light);

    transform: translateY(-1px);
}

.quick-action i {
    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: rgba(15, 56, 44, 0.08);

    border-radius: 6px;
}


/* =========================================================
   COMPANY INFO
========================================================= */

.company-info-list > div {
    padding: 11px 0;

    border-bottom: 1px solid var(--border);
}

.company-info-list > div:last-child {
    border-bottom: none;
}

.company-info-list span {
    display: block;

    color: var(--text-muted);

    font-size: 0.68rem;

    margin-bottom: 2px;
}

.company-info-list strong {
    display: block;

    font-size: 0.82rem;

    color: var(--text);
}


/* =========================================================
   TABLE TOOLBAR
========================================================= */

.table-toolbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}

.search-box {
    position: relative;

    flex: 1;

    max-width: 380px;
}

.search-box i {
    position: absolute;

    left: 12px;
    top: 50%;

    transform: translateY(-50%);

    color: var(--text-light);

    font-size: 0.8rem;
}

.search-box input {
    width: 100%;

    padding: 10px 12px 10px 35px;

    border: 1px solid var(--border);

    border-radius: 6px;

    outline: none;

    font-size: 0.8rem;
}

.search-box input:focus {
    border-color: var(--primary-light);
}

.table-toolbar select {
    padding: 10px 12px;

    border: 1px solid var(--border);

    border-radius: 6px;

    background: #fff;

    font-size: 0.8rem;

    outline: none;
}


/* =========================================================
   TABLE
========================================================= */

.table-responsive {
    width: 100%;

    overflow-x: auto;
}

.data-table {
    width: 100%;

    border-collapse: collapse;

    min-width: 750px;
}

.data-table th {
    padding: 12px;

    background: #F8FAFC;

    color: var(--text-muted);

    font-size: 0.68rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.5px;

    text-align: left;

    border-bottom: 1px solid var(--border);

    white-space: nowrap;
}

.data-table td {
    padding: 13px 12px;

    border-bottom: 1px solid var(--border);

    font-size: 0.78rem;

    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #FAFCFB;
}

.data-table td:first-child {
    color: var(--text);
    font-weight: 500;
}


/* =========================================================
   TABLE ACTION BUTTONS
========================================================= */

.table-actions {
    display: flex;

    gap: 5px;
}

.table-action-btn {
    width: 30px;
    height: 30px;

    border: 1px solid var(--border);

    background: #fff;

    border-radius: 5px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 0.72rem;

    color: var(--text-muted);

    transition: var(--transition);
}

.table-action-btn:hover {
    border-color: var(--primary);

    color: var(--primary);

    background: #F8FAFC;
}

.table-action-btn.delete:hover {
    border-color: var(--danger);

    color: var(--danger);

    background: var(--danger-bg);
}


/* =========================================================
   STATUS BADGES
========================================================= */

.status-badge {
    display: inline-flex;

    align-items: center;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 0.65rem;

    font-weight: 700;

    text-transform: capitalize;
}

.status-new {
    background: var(--info-bg);
    color: var(--info);
}

.status-read {
    background: #F1F5F9;
    color: var(--text-muted);
}

.status-replied,
.status-active {
    background: var(--success-bg);
    color: var(--success);
}

.status-processing {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-closed,
.status-inactive {
    background: #F1F5F9;
    color: var(--text-muted);
}


/* =========================================================
   PRODUCT IMAGE IN TABLE
========================================================= */

.table-product {
    display: flex;

    align-items: center;

    gap: 10px;
}

.table-product-image {
    width: 42px;
    height: 42px;

    border-radius: 5px;

    object-fit: cover;

    background: #F1F5F9;
}

.table-product-name {
    font-weight: 600;

    color: var(--primary);
}


/* =========================================================
   GALLERY ADMIN
========================================================= */

.admin-gallery-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.gallery-admin-card {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 8px;

    overflow: hidden;

    box-shadow: var(--shadow-sm);
}

.gallery-admin-image {
    height: 180px;

    position: relative;

    background: #F1F5F9;
}

.gallery-admin-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.gallery-admin-body {
    padding: 13px;
}

.gallery-admin-body h4 {
    color: var(--primary);

    font-size: 0.85rem;

    margin-bottom: 10px;
}

.gallery-admin-actions {
    display: flex;

    justify-content: space-between;

    gap: 7px;
}


/* =========================================================
   NEWS CARDS
========================================================= */

.news-admin-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.news-admin-card {
    background: #fff;

    border: 1px solid var(--border);

    border-radius: 8px;

    overflow: hidden;

    box-shadow: var(--shadow-sm);
}

.news-admin-image {
    height: 170px;

    background: #F1F5F9;
}

.news-admin-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.news-admin-body {
    padding: 17px;
}

.news-admin-date {
    color: var(--accent-hover);

    font-size: 0.65rem;

    font-weight: 700;

    text-transform: uppercase;
}

.news-admin-body h3 {
    color: var(--primary);

    font-size: 1rem;

    margin: 5px 0 8px;
}

.news-admin-body p {
    color: var(--text-muted);

    font-size: 0.75rem;

    margin-bottom: 15px;
}

.news-admin-actions {
    display: flex;

    gap: 7px;
}


/* =========================================================
   CERTIFICATE CARDS
========================================================= */

.certificate-admin-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.certificate-admin-card {
    background: #fff;

    border: 1px solid var(--border);

    border-radius: 8px;

    padding: 20px;

    box-shadow: var(--shadow-sm);
}

.certificate-icon {
    width: 48px;
    height: 48px;

    border-radius: 8px;

    background: #FEF3C7;

    color: #B45309;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 1.2rem;

    margin-bottom: 14px;
}

.certificate-admin-card h3 {
    color: var(--primary);

    font-size: 1rem;

    margin-bottom: 5px;
}

.certificate-admin-card p {
    color: var(--text-muted);

    font-size: 0.75rem;

    margin-bottom: 15px;
}

.certificate-actions {
    display: flex;

    gap: 7px;
}


/* =========================================================
   RECENT LIST
========================================================= */

.recent-list {
    min-height: 100px;
}

.recent-item {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 0;

    border-bottom: 1px solid var(--border);
}

.recent-item:last-child {
    border-bottom: none;
}

.recent-avatar {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #E8F5EE;

    color: var(--primary);

    font-size: 0.8rem;
}

.recent-content {
    flex: 1;

    min-width: 0;
}

.recent-content strong {
    display: block;

    font-size: 0.78rem;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.recent-content span {
    display: block;

    color: var(--text-muted);

    font-size: 0.68rem;
}

.recent-time {
    color: var(--text-light);

    font-size: 0.65rem;
}


/* =========================================================
   TEXT BUTTON
========================================================= */

.text-btn {
    border: none;

    background: transparent;

    color: var(--primary);

    font-size: 0.75rem;

    font-weight: 600;

    display: flex;

    align-items: center;

    gap: 5px;
}

.text-btn:hover {
    color: var(--accent-hover);
}


/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
    min-height: 140px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    color: var(--text-light);
}

.empty-state i {
    font-size: 2rem;

    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.75rem;
}


/* =========================================================
   MODAL
========================================================= */

.modal {
    position: fixed;

    inset: 0;

    z-index: 3000;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;
}

.modal-overlay {
    position: absolute;

    inset: 0;

    background: rgba(8, 33, 26, 0.65);

    backdrop-filter: blur(2px);
}

.modal-container {
    position: relative;

    width: 100%;

    max-width: 650px;

    max-height: 90vh;

    overflow-y: auto;

    background: #fff;

    border-radius: 10px;

    box-shadow: var(--shadow-lg);

    animation: modalOpen 0.2s ease;
}

@keyframes modalOpen {
    from {
        opacity: 0;

        transform: scale(0.97)
                   translateY(10px);
    }

    to {
        opacity: 1;

        transform: scale(1)
                   translateY(0);
    }
}

.modal-header {
    padding: 20px 22px;

    border-bottom: 1px solid var(--border);

    display: flex;

    justify-content: space-between;

    gap: 15px;
}

.modal-header h3 {
    color: var(--primary);

    font-size: 1.1rem;

    margin-bottom: 3px;
}

.modal-header p {
    color: var(--text-muted);

    font-size: 0.72rem;
}

.modal-close {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    border: none;

    background: #F1F5F9;

    color: var(--text-muted);

    border-radius: 5px;

    display: flex;

    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger-bg);

    color: var(--danger);
}

.modal-body {
    padding: 22px;
}


/* =========================================================
   TOAST
========================================================= */

.toast {
    position: fixed;

    right: 25px;
    bottom: 25px;

    width: min(380px, calc(100% - 40px));

    background: #fff;

    border: 1px solid var(--border);

    border-left: 4px solid var(--success);

    border-radius: 8px;

    padding: 14px;

    display: none;

    align-items: center;

    gap: 11px;

    box-shadow: var(--shadow-lg);

    z-index: 5000;

    animation: toastIn 0.25s ease;
}

.toast.show {
    display: flex;
}

@keyframes toastIn {
    from {
        opacity: 0;

        transform: translateY(10px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

.toast-icon {
    width: 32px;
    height: 32px;

    border-radius: 50%;

    background: var(--success-bg);

    color: var(--success);

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.toast strong {
    display: block;

    font-size: 0.78rem;

    color: var(--text);
}

.toast p {
    color: var(--text-muted);

    font-size: 0.68rem;
}

.toast > button {
    margin-left: auto;

    border: none;

    background: transparent;

    color: var(--text-light);
}


/* =========================================================
   FORM GRID INSIDE MODALS
========================================================= */

.modal-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 15px;
}

.modal-form-full {
    grid-column: 1 / -1;
}

.modal-form-actions {
    display: flex;

    justify-content: flex-end;

    gap: 8px;

    padding-top: 8px;

    margin-top: 8px;

    border-top: 1px solid var(--border);
}


/* =========================================================
   LOADING
========================================================= */

.loading-state {
    min-height: 120px;

    display: flex;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 10px;

    color: var(--text-muted);

    font-size: 0.8rem;
}

.loading-spinner {
    width: 30px;
    height: 30px;

    border: 3px solid var(--border);

    border-top-color: var(--primary);

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

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


/* =========================================================
   FILE UPLOAD
========================================================= */

.file-upload {
    border: 2px dashed var(--border);

    border-radius: 7px;

    padding: 25px;

    text-align: center;

    cursor: pointer;

    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary-light);

    background: #F8FAFC;
}

.file-upload i {
    font-size: 1.5rem;

    color: var(--primary);

    margin-bottom: 8px;
}

.file-upload p {
    color: var(--text-muted);

    font-size: 0.75rem;
}

.file-upload input {
    display: none;
}


/* =========================================================
   RESPONSIVE — LARGE TABLETS
========================================================= */

@media (max-width: 1200px) {

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .admin-gallery-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }

    .news-admin-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .certificate-admin-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


/* =========================================================
   RESPONSIVE — TABLETS
========================================================= */

@media (max-width: 992px) {

    :root {
        --sidebar-width: 245px;
    }

    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;

        width: 100%;
    }

    .sidebar-toggle {
        display: block;
    }

    .admin-topbar {
        padding: 15px 20px;
    }

    .admin-content {
        padding: 25px 20px;
    }

    .admin-grid-2 {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 700px) {

    .login-section {
        padding: 15px;
    }

    .login-card {
        padding: 28px 22px;
    }

    .admin-topbar {
        min-height: 70px;

        padding: 12px 15px;
    }

    .topbar-left h1 {
        font-size: 1.1rem;
    }

    .topbar-left p {
        display: none;
    }

    .admin-user-info {
        display: none;
    }

    .admin-content {
        padding: 20px 15px;
    }

    .section-intro {
        align-items: flex-start;

        flex-direction: column;
    }

    .section-intro h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;

        gap: 10px;
    }

    .stat-card {
        padding: 14px;

        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;

        font-size: 0.9rem;
    }

    .stat-content strong {
        font-size: 1.25rem;
    }

    .stat-content span {
        font-size: 0.65rem;
    }

    .admin-card {
        padding: 16px;
    }

    .table-toolbar {
        align-items: stretch;

        flex-direction: column;
    }

    .search-box {
        max-width: none;
    }

    .table-toolbar select {
        width: 100%;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .admin-gallery-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;
    }

    .gallery-admin-image {
        height: 140px;
    }

    .news-admin-grid,
    .certificate-admin-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 10px;
    }

    .modal-container {
        max-height: 94vh;
    }

    .modal-form-grid {
        grid-template-columns: 1fr;
    }

    .modal-form-full {
        grid-column: auto;
    }

    .modal-body {
        padding: 17px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-logo h1 {
        font-size: 1.5rem;
    }

    .sidebar-brand {
        height: 70px;
    }

    .admin-btn {
        width: 100%;
    }

    .section-intro > .admin-btn {
        width: 100%;
    }
}


/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;

    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);

    outline-offset: 2px;
}
