:root {
    --brand-primary: #1b7f5c;
    --brand-secondary: #3fc380;
    --brand-accent: #a2d729;
    --brand-muted: #edf6f0;
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: 27, 127, 92;
    --bs-primary-bg-subtle: #d6f5ea;
    --bs-primary-border-subtle: #a1dfc6;
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: #146946;
}

body {
    background-color: #f2f9f4;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

.auth-shell {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.google-auth-shell {
    width: 100%;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1rem 3rem;
    background:
        radial-gradient(circle at top, rgba(66, 133, 244, 0.12), transparent 55%),
        radial-gradient(circle at 20% 20%, rgba(52, 168, 83, 0.12), transparent 45%),
        radial-gradient(circle at 80% 0%, rgba(234, 67, 53, 0.12), transparent 50%),
        #f2f9f4;
}

.google-auth-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(218, 220, 224, 0.8);
    padding: 2.75rem 3.25rem;
    max-width: 460px;
    width: 100%;
    box-shadow:
        0 10px 30px rgba(26, 115, 232, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.google-auth-head .google-title {
    font-weight: 500;
}

.google-subtitle {
    color: #5f6368;
    font-size: 0.95rem;
    margin: 0;
}

.google-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.qr-logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    padding: 0.5rem;
    background: linear-gradient(145deg, rgba(27, 127, 92, 0.12), rgba(15, 81, 50, 0.08));
    border: 1px solid rgba(27, 127, 92, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.qr-logo-icon svg {
    width: 100%;
    height: 100%;
}

.google-logo-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: #5f6368;
}

.google-form {
    display: flex;
    flex-direction: column;
}

.google-field {
    position: relative;
    margin-bottom: 1.5rem;
    transition: transform 0.15s ease;
}

.google-field:focus-within {
    transform: translateY(-2px);
}

.google-input {
    width: 100%;
    border: 1px solid #dadce0;
    border-radius: 10px;
    padding: 1.4rem 3rem 0.6rem 1rem;
    background: transparent;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.google-input:focus {
    border-color: #1a73e8;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.15);
    background: #fff;
    outline: none;
}

.google-input:not(:placeholder-shown) + .google-label,
.google-input:focus + .google-label {
    top: 0.55rem;
    font-size: 0.75rem;
    color: #1a73e8;
}

.google-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #5f6368;
    transition: all 0.15s ease;
    pointer-events: none;
    background: #fff;
    padding: 0 0.25rem;
}

.google-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #1a73e8;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0;
    cursor: pointer;
    transition: color 0.15s ease;
}

.google-toggle:hover {
    color: #174ea6;
}

.google-links {
    display: flex;
    justify-content: flex-end;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.google-links a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

.google-links a:hover {
    text-decoration: underline;
}

.google-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.google-alt-action {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
    padding-left: 0;
    padding-right: 0;
    transition: color 0.15s ease;
}

.google-alt-action:hover {
    color: #174ea6;
}

.google-primary-action {
    min-width: 110px;
    border-radius: 50px;
    font-weight: 600;
    background-color: #1a73e8;
    border-color: #1a73e8;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.google-primary-action:hover {
    background-color: #1668d8;
    border-color: #1668d8;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.3);
}

.google-footnote {
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 575.98px) {
    .google-auth-card {
        padding: 2rem;
        border-radius: 12px;
    }
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background-color: #f5f7fb;
}

.sidebar {
    width: 260px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    transition: all 0.25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    border-radius: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: #495057;
    text-decoration: none;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background-color: rgba(27, 127, 92, 0.1);
    color: var(--brand-primary);
}

.sidebar-link.active {
    background-color: var(--brand-primary);
    color: #fff;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    background-color: var(--brand-muted);
    border: 1px solid rgba(27, 127, 92, 0.15);
}

.content-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
    transition: margin-left 0.25s ease;
}

.content-body {
    flex-grow: 1;
}

.camera-viewer {
    min-height: 240px;
    border: 1px dashed rgba(0, 0, 0, 0.15);
    display: grid;
    place-items: center;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar {
    width: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

body.sidebar-collapsed .content-area {
    margin-left: 0;
}

.sidebar-toggle {
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
}

.navbar-brand {
    color: var(--brand-primary) !important;
}

.stat-card {
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
    min-height: 130px;
}

.stat-card h6 {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
}

.card {
    border-radius: 1rem;
    border-color: rgba(0, 0, 0, 0.05);
}

.table thead {
    background-color: var(--brand-muted);
}

.badge-status {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.scan-panel {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    color: #fff;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(27, 127, 92, 0.25);
}

.scan-panel h2 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.scan-panel .form-control,
.scan-panel .form-select {
    border-radius: 0.75rem;
}

.qr-preview {
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background-color: var(--brand-muted);
    color: #1f5137;
}

.text-muted-sm {
    font-size: 0.9rem;
    color: #868e96 !important;
}
