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

:root {
    --bg-main: #f5f7fb;
    --bg-panel: #ffffff;
    --bg-side: #ffffff;
    --line: #e6e9f0;
    --primary: #696cff;
    --primary-soft: #eef0ff;
    --text: #384551;
    --muted: #8592a3;
    --danger: #ff3e1d;
    --success: #71dd37;
    --shadow-soft: 0 0.25rem 0.75rem rgba(34, 48, 62, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Noto Sans", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    background: radial-gradient(circle at 100% -10%, rgba(105, 108, 255, 0.15), transparent 38%), radial-gradient(circle at -5% 120%, rgba(3, 195, 236, 0.14), transparent 35%), var(--bg-main);
}

input, textarea, select, button, .btn, .form-control, .form-select, .table, .card, .alert {
    font-family: inherit;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    padding: 1rem 0.8rem;
    border-right: 1px solid var(--line);
    background: var(--bg-side);
    box-shadow: 0 0 24px rgba(67, 89, 113, 0.04);
    z-index: 2;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    border-radius: 0.75rem;
    background: linear-gradient(125deg, rgba(105, 108, 255, 0.12), rgba(3, 195, 236, 0.12));
    border: 1px solid rgba(105, 108, 255, 0.15);
}

.brand-logo {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #696cff, #03c3ec);
}

.brand-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.brand-subtitle {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.side-nav {
    display: grid;
    gap: 0.25rem;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    padding: 0.62rem 0.85rem;
    border-radius: 0.55rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.94rem;
    transition: all 0.18s ease;
}

    .side-link:hover,
    .side-link:focus {
        background: var(--primary-soft);
        color: var(--primary);
    }

    .side-link.active {
        background: var(--primary-soft);
        color: var(--primary);
        font-weight: 600;
    }

    .side-link.disabled {
        opacity: 0.5;
        pointer-events: none;
        cursor: not-allowed;
    }

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1100;
    padding: 0.9rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(5px);
}

.app-topbar-guest {
    background: transparent;
    border-bottom: none;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #566a7f;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #566a7f;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
}

.app-content {
    padding: 1.25rem;
}

.app-content-guest {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0.5rem;
}

.card-soft {
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    background: var(--bg-panel);
    box-shadow: var(--shadow-soft);
}

.metric-title {
    color: var(--muted);
    font-size: 0.85rem;
}

.metric-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.table thead th {
    background: #f8f9fa;
    color: #697a8d;
    border-bottom: 1px solid var(--line);
}

.app-data-table {
    width: 100%;
    table-layout: auto;
    border-color: var(--line);
}

.app-data-table thead th {
    vertical-align: middle;
    white-space: nowrap;
    padding: 0.72rem 0.8rem;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.app-data-table tbody td {
    vertical-align: middle;
    padding: 0.7rem 0.8rem;
    min-height: 52px;
}

.app-data-table .col-id {
    width: 84px;
    text-align: center;
    white-space: nowrap;
}

.app-data-table .col-date,
.app-data-table .col-status,
.app-data-table .col-count,
.app-data-table .col-role {
    white-space: nowrap;
}

.app-data-table .col-actions {
    width: 220px;
    min-width: 220px;
    white-space: normal;
}

.app-data-table td.col-actions,
.app-data-table th.col-actions {
    overflow: hidden;
}

.app-data-table .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-start;
}

.app-data-table .table-actions form {
    margin: 0;
}

.app-data-table .table-actions .btn {
    min-width: max-content;
    min-height: 32px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.42rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    background-color: #fff;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.app-data-table .table-actions .btn.btn-sm {
    padding: 0.35rem 0.72rem;
    font-size: 0.78rem;
}

.app-data-table .table-actions .btn:hover,
.app-data-table .table-actions .btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 0.2rem 0.45rem rgba(67, 89, 113, 0.18);
}

.app-data-table .table-actions .btn.btn-outline-primary:hover,
.app-data-table .table-actions .btn.btn-outline-primary:focus {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.app-data-table .table-actions .btn.btn-outline-secondary:hover,
.app-data-table .table-actions .btn.btn-outline-secondary:focus {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.app-data-table .table-actions .btn.btn-outline-success:hover,
.app-data-table .table-actions .btn.btn-outline-success:focus {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.app-data-table .table-actions .btn.btn-outline-info:hover,
.app-data-table .table-actions .btn.btn-outline-info:focus {
    color: #000;
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.app-data-table .table-actions .btn.btn-outline-warning:hover,
.app-data-table .table-actions .btn.btn-outline-warning:focus {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
}

.app-data-table .table-actions .btn.btn-outline-danger:hover,
.app-data-table .table-actions .btn.btn-outline-danger:focus {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.progress {
    height: 8px;
}

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

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

.workflow-guard {
    border-left: 4px solid #f0ad4e;
}

.app-content .empty-state {
    border-style: dashed !important;
}

.empty-state-icon {
    font-size: 2rem;
    color: #6b7280;
}

.authentication-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.authentication-inner {
    width: 100%;
    max-width: 460px; 
}

    .authentication-inner::before,
    .authentication-inner::after {
        content: "";
        position: absolute;
        z-index: 0;
        border-radius: 1.2rem;
    }

    .authentication-inner::before {
        width: 120px;
        height: 120px;
        top: -35px;
        right: -25px;
        background: linear-gradient(135deg, rgba(105, 108, 255, 0.38), rgba(3, 195, 236, 0.18));
    }

    .authentication-inner::after {
        width: 165px;
        height: 165px;
        left: -48px;
        bottom: -42px;
        background: linear-gradient(140deg, rgba(3, 195, 236, 0.2), rgba(105, 108, 255, 0.1));
    }

.auth-card {
    position: relative;
    z-index: 1;
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: 0 0.75rem 1.75rem rgba(67, 89, 113, 0.14);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

    .auth-brand .brand-logo {
        width: 34px;
        height: 34px;
    }

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .app-content-guest {
        padding-top: 1rem;
    }

    .authentication-wrapper {
        min-height: auto;
        padding-bottom: 1.25rem;
    }
}

@media (max-width: 576px) {
    .app-topbar {
        padding: 0.9rem 1rem;
    }

    .app-content {
        padding: 0.9rem;
    }

    .authentication-inner::before,
    .authentication-inner::after {
        display: none;
    }

    .app-data-table thead th,
    .app-data-table tbody td {
        padding: 0.58rem 0.5rem;
    }

    .app-data-table .table-actions .btn {
        min-width: max-content;
    }

    .app-data-table .col-actions {
        width: 170px;
        min-width: 170px;
    }
}

