* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    min-height: 100%;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f3f5f8;

    color: #20252b;
}


body {
    min-height: 100vh;
}


.hidden {
    display: none !important;
}


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

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

    display: flex;

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

    padding: 30px;
}


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

    background: #ffffff;

    border-radius: 14px;

    padding: 42px;

    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.08);

    border: 1px solid #e5e8ec;
}


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

.logo-area {
    width: 100%;

    display: flex;

    flex-direction: column;

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

    margin-bottom: 26px;
}


.aec-logo {
    display: block;

    width: auto;

    max-width: 230px;
    max-height: 90px;

    object-fit: contain;
}


.ndm-logo {
    display: block;

    width: auto;

    max-width: 180px;
    max-height: 85px;

    object-fit: contain;
}


.logo-divider {
    width: 80px;
    height: 1px;

    background: #dfe3e8;

    margin: 18px 0;
}


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

.login-title {
    text-align: center;

    margin-bottom: 30px;
}


.login-title h1 {
    margin: 0;

    font-size: 25px;

    font-weight: 600;

    color: #20252b;
}


.login-title p {
    margin: 8px 0 0;

    font-size: 14px;

    color: #737b85;
}


/* =========================================================
   FORMS
   ========================================================= */

.form-group {
    margin-bottom: 19px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;

    font-weight: 600;

    color: #454c54;
}


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

    height: 44px;

    padding: 0 13px;

    border: 1px solid #cfd5dc;

    border-radius: 7px;

    background: #ffffff;

    font-size: 15px;

    color: #20252b;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.form-group input:focus,
.form-group select:focus {
    border-color: #68727d;

    box-shadow:
        0 0 0 3px
        rgba(80, 90, 100, 0.10);
}


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

button {
    font-family: inherit;

    cursor: pointer;
}


.primary-button {
    border: 0;

    height: 44px;

    padding: 0 20px;

    border-radius: 7px;

    background: #252a30;

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    transition:
        background 0.15s ease,
        transform 0.05s ease;
}


.primary-button:hover {
    background: #11151a;
}


.primary-button:active {
    transform: translateY(1px);
}


#loginButton {
    width: 100%;

    margin-top: 5px;
}


.secondary-button {
    height: 42px;

    padding: 0 18px;

    border-radius: 7px;

    border: 1px solid #cfd5dc;

    background: #ffffff;

    color: #3e454c;

    font-size: 14px;

    font-weight: 600;
}


.secondary-button:hover {
    background: #f5f6f7;
}


.logout-button {
    height: 38px;

    padding: 0 15px;

    border-radius: 6px;

    border: 1px solid #555d66;

    background: transparent;

    color: #ffffff;

    font-size: 13px;
}


.logout-button:hover {
    background: rgba(255, 255, 255, 0.08);
}


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

.message {
    min-height: 20px;

    margin-top: 12px;

    font-size: 13px;

    line-height: 1.4;
}


.message.error {
    color: #b42318;
}


.message.success {
    color: #16704a;
}


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

.topbar {
    height: 70px;

    display: flex;

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

    padding: 0 28px;

    background: #252a30;

    color: #ffffff;
}


.brand {
    display: flex;

    align-items: center;

    gap: 13px;
}


.topbar-logo {
    width: 44px;
    height: 44px;

    object-fit: contain;

    background: #ffffff;

    border-radius: 6px;

    padding: 3px;
}


.brand-title {
    font-size: 16px;

    font-weight: 600;
}


.brand-subtitle {
    margin-top: 2px;

    font-size: 11px;

    color: #b7bec6;
}


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

.topbar-right {
    display: flex;

    align-items: center;

    gap: 25px;
}


/* =========================================================
   NDM ONLINE INDICATOR
   ========================================================= */

.system-status {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 0.7px;

    color: #aeb7bf;
}


.status-light {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #25c56f;

    box-shadow:
        0 0 6px rgba(37, 197, 111, 0.8);

    animation:
        ndm-status-blink 1.5s infinite ease-in-out;
}


@keyframes ndm-status-blink {

    0% {
        opacity: 1;

        box-shadow:
            0 0 7px
            rgba(37, 197, 111, 0.9);
    }

    50% {
        opacity: 0.35;

        box-shadow:
            0 0 2px
            rgba(37, 197, 111, 0.3);
    }

    100% {
        opacity: 1;

        box-shadow:
            0 0 7px
            rgba(37, 197, 111, 0.9);
    }

}


.topbar-user {
    display: flex;

    align-items: center;

    gap: 14px;

    font-size: 13px;
}


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

.dashboard {
    padding: 32px;
}


.dashboard-header {
    display: flex;

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

    margin-bottom: 22px;
}


.dashboard-header h1 {
    margin: 0;

    font-size: 25px;

    font-weight: 600;
}


.dashboard-header p {
    margin: 7px 0 0;

    color: #727a83;

    font-size: 14px;
}


.add-button {
    white-space: nowrap;
}


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

.table-card {
    width: 100%;

    background: #ffffff;

    border: 1px solid #e0e4e8;

    border-radius: 10px;

    overflow-x: auto;

    box-shadow:
        0 4px 16px
        rgba(0, 0, 0, 0.035);
}


table {
    width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}


thead {
    background: #f7f8fa;
}


th {
    padding: 14px 15px;

    text-align: left;

    font-size: 12px;

    font-weight: 700;

    color: #68717b;

    border-bottom: 1px solid #e1e5e9;

    white-space: nowrap;
}


td {
    padding: 14px 15px;

    border-bottom: 1px solid #edf0f2;

    color: #30363d;

    vertical-align: middle;
}


tbody tr:last-child td {
    border-bottom: 0;
}


tbody tr:hover {
    background: #fafbfc;
}


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

.status-active {
    color: #16704a;

    font-weight: 600;
}


.status-inactive {
    color: #777f87;

    font-weight: 600;
}


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

.action-group {
    display: flex;

    gap: 7px;

    white-space: nowrap;
}


.action-button {
    height: 32px;

    padding: 0 10px;

    border-radius: 5px;

    border: 1px solid #d2d7dc;

    background: #ffffff;

    color: #454c54;

    font-size: 12px;
}


.action-button:hover {
    background: #f4f6f8;
}


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

.modal {
    position: fixed;

    inset: 0;

    display: flex;

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

    padding: 25px;

    background:
        rgba(20, 24, 28, 0.48);

    z-index: 1000;
}


.modal-card {
    width: 100%;

    max-width: 480px;

    background: #ffffff;

    border-radius: 12px;

    padding: 28px;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.18);
}


.modal-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 25px;
}


.modal-header h2 {
    margin: 0;

    font-size: 20px;
}


.modal-header p {
    margin: 6px 0 0;

    color: #737b84;

    font-size: 13px;
}


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

    border: 0;

    background: transparent;

    border-radius: 6px;

    font-size: 25px;

    line-height: 1;

    color: #707780;
}


.modal-close:hover {
    background: #f1f3f5;
}


/* =========================================================
   ROLE DESCRIPTION
   ========================================================= */

.role-description {
    margin-top: -7px;

    margin-bottom: 19px;

    padding: 10px 12px;

    border-left: 3px solid #cfd5dc;

    background: #f7f8fa;

    font-size: 12px;

    line-height: 1.5;

    color: #737b84;
}


.role-description strong {
    display: block;

    margin-bottom: 2px;

    color: #454c54;
}


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

.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 9px;

    margin-top: 24px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .topbar {
        height: auto;

        min-height: 70px;

        padding: 14px 18px;

        flex-wrap: wrap;

        gap: 12px;
    }


    .topbar-right {
        width: 100%;

        justify-content: flex-end;
    }


    .dashboard {
        padding: 22px 16px;
    }


    .dashboard-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 18px;
    }


    .add-button {
        width: 100%;
    }

}


@media (max-width: 600px) {

    .login-section {
        padding: 18px;
    }


    .login-card {
        padding: 32px 25px;
    }


    .system-status {
        display: none;
    }

}
