/* =========================================================
   BINAA WAREHOUSE
   Shared Application UI
   ========================================================= */

:root {
    --primary: #087f6d;
    --primary-dark: #075f55;
    --primary-deep: #064e46;
    --primary-soft: #eaf7f4;

    --navy: #0d1b3e;
    --text: #18233c;
    --muted: #718096;

    --background: #f4f7f8;
    --surface: #ffffff;
    --border: #e2e8f0;

    --danger: #c53030;
    --danger-bg: #fff5f5;

    --success: #16794b;
    --success-bg: #ecfdf5;

    --radius: 14px;
    --radius-lg: 22px;

    --shadow:
        0 10px 35px rgba(15, 23, 42, .08);

    --shadow-soft:
        0 4px 18px rgba(15, 23, 42, .06);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: var(--background);
    color: var(--text);
}


/* =========================================================
   AUTHENTICATION LAYOUT
   ========================================================= */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 44% 56%;
}


/* LEFT PANEL */

.auth-brand {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    min-height: 100vh;

    padding: 55px;

    color: white;

    background:
        linear-gradient(
            145deg,
            #075d55 0%,
            #06473f 55%,
            #043c36 100%
        );
}

.auth-brand::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255,255,255,.08),
            transparent 35%
        );

    pointer-events: none;
}

.brand-top,
.brand-features,
.brand-footer {
    position: relative;
    z-index: 2;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.22);

    font-size: 27px;
}

.brand-title {
    margin: 0;
    font-size: 27px;
    font-weight: 750;
}

.brand-subtitle {
    margin: 5px 0 0;
    color: rgba(255,255,255,.75);
    font-size: 14px;
}


/* FEATURES */

.brand-features {
    max-width: 420px;
}

.feature {
    display: flex;
    gap: 16px;
    margin: 30px 0;
}

.feature-icon {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.20);

    font-size: 20px;
}

.feature h3 {
    margin: 1px 0 5px;
    font-size: 16px;
}

.feature p {
    margin: 0;

    color: rgba(255,255,255,.72);

    font-size: 13px;
    line-height: 1.6;
}


/* FOOTER */

.brand-footer {
    color: rgba(255,255,255,.72);
    font-size: 13px;
}

.brand-footer strong {
    display: block;
    color: white;
    margin-bottom: 4px;
}


/* =========================================================
   AUTH RIGHT SIDE
   ========================================================= */

.auth-content {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px;

    background:
        radial-gradient(
            circle at 80% 10%,
            #eaf5f3,
            transparent 32%
        ),
        #f7fafb;
}

.auth-card {
    width: 100%;
    max-width: 500px;

    background: white;

    border: 1px solid rgba(226,232,240,.9);
    border-radius: var(--radius-lg);

    padding: 42px;

    box-shadow: var(--shadow);
}

.auth-card-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card-logo .cube {
    width: 64px;
    height: 64px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: white;
    font-size: 31px;

    box-shadow:
        0 8px 22px rgba(8,127,109,.24);
}

.auth-card h1 {
    margin: 0 0 7px;

    text-align: center;

    color: var(--navy);

    font-size: 29px;
}

.auth-description {
    text-align: center;
    color: var(--muted);
    margin-bottom: 28px;
}


/* =========================================================
   AUTH MESSAGE
   ========================================================= */

.auth-notice {
    display: flex;
    gap: 13px;
    align-items: center;

    margin-bottom: 25px;
    padding: 15px 17px;

    border-radius: 12px;

    background: var(--primary-soft);

    color: var(--primary-dark);

    font-size: 14px;
}

.auth-notice-icon {
    font-size: 19px;
}


/* =========================================================
   FORMS
   ========================================================= */

.form-group {
    margin-bottom: 19px;
}

.form-label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 650;

    color: var(--text);
}

.form-input {
    width: 100%;

    height: 48px;

    padding: 0 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #fff;

    color: var(--text);

    font-size: 15px;

    outline: none;

    transition:
        border-color .2s,
        box-shadow .2s;
}

.form-input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px rgba(8,127,109,.10);
}

.form-input::placeholder {
    color: #a0aec0;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn-primary {
    width: 100%;

    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 0;
    border-radius: 10px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: white;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform .15s,
        box-shadow .15s;
}

.btn-primary:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 20px rgba(8,127,109,.20);
}


/* =========================================================
   MESSAGES
   ========================================================= */

.alert {
    padding: 14px 16px;

    margin-bottom: 20px;

    border-radius: 10px;

    font-size: 14px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fed7d7;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #bbf7d0;
}


/* =========================================================
   AUTH FOOTER
   ========================================================= */

.auth-security {
    margin-top: 24px;

    text-align: center;

    color: #9aa5b1;

    font-size: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .auth-page {
        display: block;
    }

    .auth-brand {
        display: none;
    }

    .auth-content {
        min-height: 100vh;
        padding: 25px;
    }

    .auth-card {
        padding: 30px 25px;
    }
}
/* =========================================================
   BINAA WAREHOUSE — ADMIN AREA
   ========================================================= */

.admin-page {
    min-height: 100vh;
    background: #f5f7f9;
}

.admin-header {
    height: 72px;
    padding: 0 32px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #fff;
    border-bottom: 1px solid var(--border);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-brand-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--primary);
    color: #fff;

    font-size: 21px;
}

.admin-brand-name {
    font-weight: 750;
    color: var(--navy);
}

.admin-brand-sub {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-user-details {
    text-align: right;
}

.admin-user-name {
    font-size: 14px;
    font-weight: 650;
}

.admin-user-role {
    color: var(--muted);
    font-size: 12px;
}

.admin-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary-soft);
    color: var(--primary-dark);

    font-weight: 750;
}


/* Layout */

.admin-layout {
    display: flex;
    min-height: calc(100vh - 72px);
}

.admin-sidebar {
    width: 235px;
    flex: 0 0 235px;

    padding: 25px 16px;

    background: #fff;
    border-right: 1px solid var(--border);
}

.admin-nav-label {
    margin: 5px 12px 10px;

    color: #a0aec0;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;

    margin-bottom: 5px;
    padding: 11px 13px;

    border-radius: 9px;

    color: #536174;

    text-decoration: none;

    font-size: 14px;
    font-weight: 550;
}

.admin-nav-link:hover {
    background: #f7faf9;
    color: var(--primary-dark);
}

.admin-nav-link.active {
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
}

.admin-nav-separator {
    height: 1px;

    margin: 20px 10px;

    background: var(--border);
}


/* Main */

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 36px;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 27px;
}

.page-heading h1 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 27px;
}

.page-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}


/* Buttons */

.admin-button {
    min-height: 43px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 17px;

    border: 0;
    border-radius: 9px;

    font-size: 14px;
    font-weight: 650;

    cursor: pointer;

    text-decoration: none;
}

.admin-button.primary {
    background: var(--primary);
    color: #fff;
}

.admin-button.primary:hover {
    background: var(--primary-dark);
}

.admin-button.secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.admin-button.danger {
    background: #fff;
    color: #c53030;
    border: 1px solid #fed7d7;
}


/* Summary */

.user-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;

    margin-bottom: 24px;
}

.summary-card {
    padding: 20px;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 13px;

    box-shadow: var(--shadow-soft);
}

.summary-label {
    color: var(--muted);
    font-size: 13px;
}

.summary-value {
    margin-top: 7px;

    color: var(--navy);

    font-size: 28px;
    font-weight: 750;
}


/* User table */

.admin-card {
    background: #fff;

    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow: var(--shadow-soft);

    overflow: hidden;
}

.admin-card-header {
    padding: 20px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}

.admin-card-title {
    font-weight: 700;
    color: var(--navy);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th {
    padding: 13px 18px;

    background: #f8fafb;

    color: #718096;

    text-align: left;

    font-size: 11px;
    font-weight: 750;

    letter-spacing: .04em;
    text-transform: uppercase;

    border-bottom: 1px solid var(--border);
}

.user-table td {
    padding: 16px 18px;

    border-bottom: 1px solid #edf1f4;

    font-size: 14px;

    vertical-align: middle;
}

.user-table tr:last-child td {
    border-bottom: 0;
}

.user-person {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-person-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    border-radius: 50%;

    background: var(--primary-soft);
    color: var(--primary-dark);

    font-weight: 750;
}

.user-person-name {
    color: var(--text);
    font-weight: 650;
}

.user-person-email {
    margin-top: 3px;

    color: var(--muted);
    font-size: 12px;
}


/* Badges */

.role-badge,
.status-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 11px;
    font-weight: 700;
}

.role-admin {
    background: #eaf7f4;
    color: #087f6d;
}

.role-officer {
    background: #eef2ff;
    color: #4f46e5;
}

.status-active {
    background: #ecfdf5;
    color: #16794b;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}


/* Actions */

.action-buttons {
    display: flex;
    gap: 7px;
}

.icon-button {
    min-width: 34px;
    height: 34px;

    padding: 0 9px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #fff;

    color: #536174;

    cursor: pointer;
}

.icon-button:hover {
    background: #f8fafb;
    color: var(--primary-dark);
}


/* Modal */

.modal-backdrop {
    position: fixed;
    inset: 0;

    z-index: 1000;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, .46);
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    width: 100%;
    max-width: 550px;

    max-height: 90vh;
    overflow-y: auto;

    background: #fff;

    border-radius: 16px;

    box-shadow:
        0 25px 60px rgba(15,23,42,.22);
}

.modal-header {
    padding: 21px 23px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    color: var(--navy);
    font-size: 19px;
}

.modal-close {
    width: 34px;
    height: 34px;

    border: 0;
    border-radius: 8px;

    background: #f3f5f7;

    cursor: pointer;

    font-size: 18px;
}

.modal-body {
    padding: 23px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 25px;
}

.modal-actions .admin-button {
    min-width: 105px;
}


/* Select */

.form-select {
    width: 100%;
    height: 48px;

    padding: 0 13px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #fff;

    color: var(--text);
    font-size: 15px;
}


/* Toast */

.app-toast {
    position: fixed;
    right: 25px;
    bottom: 25px;

    z-index: 2000;

    min-width: 280px;
    max-width: 420px;

    padding: 14px 17px;

    border-radius: 10px;

    background: #1f2937;
    color: #fff;

    box-shadow: var(--shadow);

    opacity: 0;
    transform: translateY(15px);

    pointer-events: none;

    transition: .2s ease;
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.app-toast.error {
    background: #b42318;
}


/* Responsive */

@media (max-width: 850px) {

    .admin-sidebar {
        display: none;
    }

    .admin-main {
        padding: 23px;
    }

    .user-summary {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {

    .admin-header {
        padding: 0 18px;
    }

    .admin-user-details {
        display: none;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading .admin-button {
        width: 100%;
    }

}