:root {
    --bg: #f4f7fb;
    --bg-soft: #eef4fa;
    --surface: #ffffff;
    --surface-strong: #f9fcff;
    --text: #10263a;
    --text-muted: #61788d;
    --line: #d7e4ef;
    --brand: #0f766e;
    --brand-strong: #0a5d57;
    --accent: #f59e0b;
    --danger: #cf3f3f;
    --success: #1e875f;
    --shadow-soft: 0 10px 28px rgba(27, 64, 96, 0.08);
    --shadow-card: 0 6px 16px rgba(14, 43, 67, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.tcp-body {
    min-height: 100vh;
    position: relative;
}

.tcp-bg-orb {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
    filter: blur(6px);
}

.orb-a {
    width: 340px;
    height: 340px;
    top: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.25), rgba(15, 118, 110, 0));
}

.orb-b {
    width: 280px;
    height: 280px;
    bottom: 5%;
    left: -70px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0));
}

.tcp-shell {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
}

.tcp-sidebar {
    width: 290px;
    min-height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(180deg, #0b2d44, #123b58);
    color: #e5f2ff;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 0;
    transition: transform 0.28s ease;
}

.tcp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
}

.tcp-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    color: #083544;
    background: linear-gradient(145deg, #b5f5e4, #6be0c1);
}

.tcp-brand-title {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.tcp-brand small {
    opacity: 0.85;
}

.tcp-command-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    color: #e8f7ff;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    cursor: pointer;
}

.tcp-command-btn kbd {
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.tcp-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tcp-nav-link {
    color: #d8e8f5;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    font-weight: 600;
}

.tcp-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.tcp-nav-link.is-active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.tcp-sidebar-footer {
    margin-top: auto;
}

.tcp-logout-link {
    width: 100%;
    color: #ffdecf;
    text-decoration: none;
    background: rgba(207, 63, 63, 0.16);
    border: 1px solid rgba(255, 193, 176, 0.26);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tcp-main {
    width: calc(100% - 290px);
    padding: 14px 18px 20px;
}

.tcp-topbar {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(209, 225, 238, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.tcp-quick-search {
    border: 1px solid var(--line);
    background: var(--surface-strong);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 9px 12px;
    width: min(560px, 68vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tcp-quick-search kbd {
    font-size: 0.68rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-muted);
}

.tcp-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tcp-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.tcp-user {
    display: flex;
    gap: 9px;
    align-items: center;
}

.tcp-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #0f766e, #0b5f8f);
}

.tcp-user-name {
    font-weight: 700;
    line-height: 1.1;
}

.tcp-page {
    padding-top: 14px;
    animation: page-in 0.32s ease;
}

@keyframes page-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tcp-alert {
    border-radius: 12px;
    border: 0;
}

.tcp-icon-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-muted);
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    background: rgba(255, 255, 255, 0.94);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    color: #163147;
}

.table > :not(caption) > * > * {
    border-bottom-color: #e6eff6;
}

.card-metric {
    position: relative;
    overflow: hidden;
}

.card-metric::after {
    content: "";
    position: absolute;
    right: -16px;
    top: -16px;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.2), rgba(15, 118, 110, 0));
}

.metric-title {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-value {
    font-size: 1.44rem;
    font-weight: 800;
    margin-top: 4px;
}

.small-list {
    max-height: 420px;
    overflow: auto;
}

.search-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px;
    margin-bottom: 9px;
    background: #fff;
}

.search-item h6 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
}

.tcp-pos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.tcp-pos-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.tcp-kbd-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tcp-kbd-group span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 5px 10px;
}

.tcp-subtle {
    color: var(--text-muted);
}

.tcp-command-modal {
    position: fixed;
    inset: 0;
    background: rgba(13, 32, 46, 0.45);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8vh;
    z-index: 1000;
}

.tcp-command-modal.is-open {
    display: flex;
}

.tcp-command-box {
    width: min(760px, 92vw);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 24px 50px rgba(3, 21, 35, 0.2);
    overflow: hidden;
}

.tcp-command-head {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
}

.tcp-command-head input {
    border: 0;
    outline: none;
    flex: 1;
    font-size: 0.95rem;
}

.tcp-command-list {
    max-height: 360px;
    overflow: auto;
    padding: 8px;
}

.tcp-command-item {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.tcp-command-item:hover,
.tcp-command-item.is-active {
    border-color: var(--line);
    background: #f5fbff;
}

.tcp-toast-wrap {
    position: fixed;
    top: 20px;
    right: 18px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tcp-toast {
    min-width: 240px;
    max-width: 360px;
    border-radius: 10px;
    padding: 10px 12px;
    color: #fff;
    box-shadow: 0 12px 20px rgba(12, 29, 44, 0.2);
}

.tcp-toast.info { background: #0a6f9b; }
.tcp-toast.success { background: #0f7a57; }
.tcp-toast.error { background: #bf3d3d; }

.guest-bg {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, #d4efe8 0%, #ebf5fb 30%, #f5f8fc 100%);
}

.tcp-auth-card {
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

@media (max-width: 1199px) {
    .tcp-sidebar {
        width: 260px;
    }

    .tcp-main {
        width: calc(100% - 260px);
    }
}

@media (max-width: 991px) {
    .tcp-sidebar {
        position: fixed;
        z-index: 1001;
        transform: translateX(-105%);
        height: 100vh;
    }

    .tcp-sidebar.is-open {
        transform: translateX(0);
    }

    .tcp-main {
        width: 100%;
        padding: 10px;
    }

    .tcp-topbar {
        flex-wrap: wrap;
    }

    .tcp-quick-search {
        width: 100%;
    }

    .tcp-topbar-right {
        width: 100%;
        justify-content: space-between;
    }
}
