 /* =========================================================
   HIVE UI
   ========================================================= */

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

:root {
    --bg: #f7f6f2;
    --surface: #ffffff;
    --surface-soft: #fbfaf7;

    --text: #242525;
    --text-soft: #747775;

    --border: #e5e5df;
    --border-strong: #d6d8d3;

    --hive-dark: #285e58;
    --hive-primary: #3f8178;
    --hive-primary-hover: #347168;
    --hive-soft: #eaf3f1;

    --hive-gold: #d6a23c;
    --hive-gold-soft: #fbf2dc;

    --success: #3f7c5d;
    --success-soft: #edf6f0;

    --warning: #b97827;
    --warning-soft: #fff5e8;

    --danger: #b84d4d;
    --danger-soft: #fceeee;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;

    --shadow:
        0 1px 2px rgba(18, 30, 27, 0.03),
        0 10px 30px rgba(18, 30, 27, 0.05);

    --control-height: 46px;
}

/* RESET */

* {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

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

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

/* =========================================================
   PAGE
   ========================================================= */

.app {
    min-height: 100vh;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.page {
    padding: 36px 0 60px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-subtitle {
    margin: 7px 0 0;
    color: var(--text-soft);
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */

.topbar {
    height: 72px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    width: min(1180px, calc(100% - 40px));
    height: 100%;
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 34px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand img {
    display: block;
    max-height: 38px;
    width: auto;
}

.brand-text {
    color: var(--hive-dark);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.nav a {
    padding: 9px 13px;
    border-radius: var(--radius-sm);
    color: #606461;
    font-weight: 500;
    transition: 0.15s ease;
}

.nav a:hover {
    color: var(--hive-dark);
    background: var(--hive-soft);
}

.nav a.active {
    color: var(--hive-dark);
    background: var(--hive-soft);
    font-weight: 600;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.card-body {
    padding: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

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

label {
    color: #454946;
    font-size: 13px;
    font-weight: 600;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
select {
    width: 100%;
    height: var(--control-height);

    padding: 0 13px;

    background: #fff;
    color: var(--text);

    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);

    outline: none;

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

textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;

    padding: 12px 13px;

    background: #fff;
    color: var(--text);

    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);

    outline: none;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--hive-primary);
    box-shadow: 0 0 0 3px rgba(63, 129, 120, 0.12);
}

input::placeholder,
textarea::placeholder {
    color: #a6aaa7;
}

.help-text {
    color: var(--text-soft);
    font-size: 12px;
}

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

.btn {
    min-height: var(--control-height);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 17px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    cursor: pointer;

    font-weight: 600;
    line-height: 1;

    transition: 0.15s ease;
}

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

.btn-primary:hover {
    background: var(--hive-primary-hover);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-secondary:hover {
    background: var(--surface-soft);
}

.btn-gold {
    background: var(--hive-gold);
    color: #fff;
}

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

.btn-sm {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    margin-bottom: 20px;
    padding: 13px 15px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-weight: 500;
}

.alert-error {
    background: var(--danger-soft);
    border-color: #f3d2d2;
    color: #8f3939;
}

.alert-success {
    background: var(--success-soft);
    border-color: #d8ebdf;
    color: #356b50;
}

.alert-warning {
    background: var(--warning-soft);
    border-color: #f2dfc2;
    color: #95611e;
}

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

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

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

tbody tr:hover {
    background: #fbfbf8;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    color: var(--success);
    background: var(--success-soft);
}

.badge-warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.badge-danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.badge-neutral {
    color: #626663;
    background: #f0f1ee;
}

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

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

    display: grid;
    place-items: center;

    padding: 30px;

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(214, 162, 60, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(63, 129, 120, 0.12),
            transparent 32%
        ),
        var(--bg);
}

.login-box {
    width: min(420px, 100%);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.login-logo img {
    max-width: 170px;
    max-height: 64px;
    object-fit: contain;
}

.login-card {
    padding: 30px;
    background: #fff;

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

    box-shadow:
        0 20px 60px rgba(35, 55, 50, 0.08);
}

.login-title {
    margin: 0 0 6px;
    text-align: center;
    font-size: 23px;
    font-weight: 700;
}

.login-subtitle {
    margin: 0 0 26px;
    color: var(--text-soft);
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.login-form .btn {
    width: 100%;
    margin-top: 4px;
}

/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty-state {
    padding: 50px 30px;
    text-align: center;
    color: var(--text-soft);
}

.empty-state strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
    font-size: 16px;
}

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

@media (max-width: 820px) {

    .container,
    .topbar-inner {
        width: min(100% - 24px, 1180px);
    }

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

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        display: none;
    }

    .topbar-inner {
        justify-content: space-between;
    }
}

@media (max-width: 520px) {

    .page {
        padding-top: 24px;
    }

    .page-title {
        font-size: 24px;
    }

    .card-body {
        padding: 18px;
    }

    .login-card {
        padding: 24px 20px;
    }

    .actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .actions .btn {
        width: 100%;
    }
}