:root {
    --water-900: #0b3954;
    --water-700: #087e8b;
    --water-500: #3bb5c3;
    --water-300: #8ee3ef;
    --water-100: #dff7fb;
    --surface: #f4fbfd;
    --text-dark: #163047;
}

* {
    font-family: "Plus Jakarta Sans", sans-serif;
}

body {
    background:
        radial-gradient(circle at top right, rgba(142, 227, 239, 0.45), transparent 25%),
        linear-gradient(180deg, #ecfbff 0%, #f7fdff 100%);
    color: var(--text-dark);
    min-height: 100vh;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card,
.card,
.stat-card {
    border-radius: 24px;
}

.login-card {
    width: min(100%, 480px);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.login-logo,
.brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.6rem;
    color: white;
    background: linear-gradient(135deg, var(--water-700), var(--water-500));
    box-shadow: 0 16px 32px rgba(8, 126, 139, 0.24);
}

.brand-logo-wrap {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(8, 126, 139, 0.18);
    flex-shrink: 0;
}

.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

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

.sidebar {
    width: 290px;
    background: linear-gradient(180deg, rgba(11, 57, 84, 0.96), rgba(8, 126, 139, 0.9));
    color: white;
    padding: 28px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.84);
    border-radius: 16px;
    padding: 12px 16px;
    font-weight: 600;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: white;
}

.main-content {
    flex: 1;
    padding: 30px;
}

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

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-subtitle,
.text-secondary {
    color: #62849a !important;
}

.user-chip {
    background: white;
    border-radius: 999px;
    padding: 10px 18px;
    box-shadow: 0 12px 24px rgba(11, 57, 84, 0.08);
    font-weight: 700;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(223, 247, 251, 0.92));
    padding: 24px;
    box-shadow: 0 14px 30px rgba(11, 57, 84, 0.08);
}

.stat-label {
    color: #5e8197;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--water-900);
}

.btn-water,
.btn-outline-water:hover {
    background: linear-gradient(135deg, var(--water-700), var(--water-500));
    color: white;
    border: 0;
}

.btn-water:hover {
    color: white;
    filter: brightness(0.98);
}

.btn-outline-water {
    color: var(--water-700);
    border: 1px solid rgba(8, 126, 139, 0.3);
    background: rgba(255, 255, 255, 0.86);
}

.form-control,
.form-select {
    border-radius: 16px;
    padding: 0.82rem 1rem;
    border-color: rgba(8, 126, 139, 0.14);
}

.ocr-preview-box {
    min-height: 250px;
    border-radius: 22px;
    border: 1px dashed rgba(8, 126, 139, 0.34);
    background: rgba(223, 247, 251, 0.6);
    display: grid;
    place-items: center;
    padding: 16px;
}

.roi-preview-box {
    min-height: 120px;
    border-radius: 20px;
    border: 1px dashed rgba(8, 126, 139, 0.28);
    background: rgba(255, 255, 255, 0.72);
    padding: 16px;
}

.roi-preview-box img {
    max-height: 140px;
}

.camera-panel {
    padding: 16px;
    border-radius: 20px;
    background: rgba(223, 247, 251, 0.45);
    border: 1px solid rgba(8, 126, 139, 0.12);
}

.camera-live-box {
    border-radius: 22px;
    overflow: hidden;
    background: #d9f3f7;
    border: 1px dashed rgba(8, 126, 139, 0.34);
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-live-box video {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    background: #bfe7ef;
}

.customer-summary {
    padding: 18px;
    border-radius: 20px;
    background: var(--water-100);
}

.customer-search-list {
    max-height: 420px;
    overflow-y: auto;
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    color: #5e8197;
    font-weight: 700;
}

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

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .main-content {
        padding: 20px;
    }

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