﻿@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Prompt", "Segoe UI", Tahoma, sans-serif;
    background: #f4f8fb;
    color: #1f2937;
}

body {
    min-height: 100vh;
    font-weight: 400;
}

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

.portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.portal-header {
    background: #ffffff;
    border-bottom: 1px solid #dbe7f0;
    padding: 24px 28px 18px;
}

.brand {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 20px;
}

.brand-main {
    font-size: 32px;
    font-weight: 800;
    color: #111827;
}

.brand-sub {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.portal-content {
    flex: 1;
    width: 100%;
    padding: 34px 18px;
}

.portal-footer {
    text-align: center;
    padding: 20px;
    color: #8795a4;
    font-size: 13px;
}

.login-card,
.admin-card {
    width: min(900px, 100%);
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #dbe7f0;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 14px 38px rgba(43, 74, 97, 0.08);
}

.login-card {
    width: min(760px, 100%);
}

.login-title,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.login-title h1,
.admin-header h1 {
    margin: 0 0 5px 0;
    font-size: 25px;
    font-weight: 700;
    color: #18212b;
}

.logo-circle {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #62b144;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 800;
}

.muted {
    color: #72808e;
    font-size: 14px;
}

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

.form-group label,
.admin-filter label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #27313b;
}

.form-control {
    width: 100%;
    height: 50px;
    border: 1px solid #b9c9d7;
    border-radius: 11px;
    padding: 0 15px;
    font-size: 16px;
    outline: none;
    background: #ffffff;
    color: #1f2937;
}

.form-control:focus {
    border-color: #2f8ff5;
    box-shadow: 0 0 0 3px rgba(47, 143, 245, 0.12);
}

.validation-message {
    display: block;
    margin-top: 6px;
    color: #d14343;
    font-size: 13px;
}

.checkbox-row {
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d3dee7;
    border-radius: 11px;
    padding: 0 15px;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
}

.btn-primary,
.btn-company,
.btn-secondary,
.btn-edit,
.btn-toggle,
.btn-delete {
    border: 0;
    border-radius: 9px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    min-height: 50px;
    background: linear-gradient(90deg, #3898ff, #0767c9);
    color: #ffffff;
    font-size: 17px;
}

.btn-company {
    flex: 0 0 auto;
    background: #1282df;
    color: #ffffff;
    padding: 11px 18px;
}

.btn-secondary {
    background: #edf2f6;
    color: #3f4c58;
    padding: 10px 15px;
}

.btn-edit {
    background: #e8f3ff;
    color: #0b6fca;
    padding: 7px 11px;
}

.btn-toggle {
    background: #fff4dc;
    color: #956300;
    padding: 7px 11px;
}

.btn-delete {
    background: #ffe7e7;
    color: #b52b2b;
    padding: 7px 11px;
}

.company-section {
    margin-top: 32px;
    border-top: 1px solid #e4ebf1;
    padding-top: 24px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 14px;
}

.company-list {
    display: grid;
    gap: 12px;
}

.company-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dce7ef;
    border-radius: 13px;
    padding: 17px 18px;
    background: #fbfdff;
}

.company-name {
    font-size: 18px;
    font-weight: 700;
    color: #17212b;
    margin-bottom: 4px;
}

.company-code,
.small-code {
    color: #6f7e8b;
    font-size: 12px;
}

.company-code {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: #edf5ff;
    color: #236db7;
    font-weight: 600;
}

.empty-state,
.empty-row {
    padding: 20px;
    color: #647483;
    text-align: center;
}

.alert-error,
.alert-success {
    margin-top: 18px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #f1b7b7;
    color: #a52e2e;
}

.alert-success {
    background: #eef9ed;
    border: 1px solid #b9dfb5;
    color: #327129;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px;
}

.admin-grid-full {
    grid-column: 1 / -1;
}

.admin-filter {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #e3ebf1;
    max-width: 430px;
}

.admin-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e4ebf1;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background: #f6f9fb;
    font-size: 13px;
    font-weight: 700;
    color: #536371;
}

.center {
    text-align: center !important;
}

.right {
    text-align: right !important;
}

.action-buttons {
    white-space: nowrap;
}

.action-buttons button + button {
    margin-left: 5px;
}

.status-active,
.status-inactive {
    display: inline-block;
    border-radius: 20px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #eaf7e7;
    color: #377b2c;
}

.status-inactive {
    background: #f0f1f2;
    color: #727b83;
}

@media (max-width: 700px) {
    .portal-header {
        padding: 18px 14px;
    }

    .brand {
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .brand-main {
        font-size: 27px;
    }

    .brand-sub {
        font-size: 15px;
    }

    .portal-content {
        padding: 20px 10px;
    }

    .login-card,
    .admin-card {
        padding: 24px 18px;
        border-radius: 14px;
    }

    .login-title,
    .admin-header {
        align-items: flex-start;
    }

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

    .admin-grid-full {
        grid-column: auto;
    }

    .company-card {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-company {
        text-align: center;
    }
}
