/**
 * Stylesheet Midigen
 * Design Moderno com Paleta Personalizada
 * Autor: Midigen Team
 */

:root {
    --color-bg: #f5f5f5;
    --color-bg-gradient: linear-gradient(35deg, #00243d 0%, #30AABC 100%);
    --color-primary: #17494D;
    --color-primary-light: #30AABC;
    --color-primary-dark: #00243d;
    --color-primary-material: #00A653;
    --color-tertiary: #D1F470;
    --color-secondary: #20272B;
    --color-text: #2c2c2c;
    --color-text-light: #879fac;
    --color-border: #e0e0e0;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
    
    --shadow-sm: 0 5px 15px rgba(0, 54, 61, 0.1);
    --shadow-md: 0 10px 25px rgba(0, 54, 61, 0.15);
    --shadow-lg: 0 15px 40px rgba(0, 54, 61, 0.2);
    
    --border-radius: 5px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container,
.container-fluid {
    width: min(100% - 2rem, 1180px);
    margin-inline: auto;
}

.container-fluid {
    width: min(100% - 2rem, 1440px);
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.col,
.col-12,
.col-md-3,
.col-md-4,
.col-md-6,
.col-lg-3,
.col-lg-4 {
    min-width: 0;
}

.col { flex: 1 1 0; }
.col-12 { flex: 0 0 100%; }
.col-lg-4 { flex: 1 1 min(100%, 340px); }
.col-lg-3 { flex: 1 1 min(100%, 230px); }
.col-md-4 { flex: 1 1 min(100%, 300px); }
.col-md-6 { flex: 1 1 min(100%, 420px); }
.col-md-3 { flex: 1 1 min(100%, 220px); }

.py-4 { padding-block: 1.5rem; }
.py-5 { padding-block: 2.5rem; }
.p-0 { padding: 0 !important; }
.p-3 { padding: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.my-4 { margin-block: 1.5rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.w-100 { width: 100% !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.text-white { color: #fff !important; }
.text-capitalize { text-transform: capitalize !important; }
.border-0 { border: 0 !important; }
.table-responsive { overflow-x: auto; }

main {
    flex: 1;
    padding: 2rem 0;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    letter-spacing: 0;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
    text-decoration: none;
}

footer {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 2rem 0;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background-color: white;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--color-bg);
    border: none;
    padding: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--color-primary);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
    font-size: 0.96rem;
    line-height: 1.2;
}

.btn:focus {
    outline: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-light) 100%);
    background-color: var(--color-primary);
    color: white;
    border: none; 
    padding: 0.75rem 1.5rem; 
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.96rem;
    line-height: 1.2;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary-dark) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #0f1419;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-soft {
    background-color: #eef3f4;
    color: #273b42;
}

.btn-secondary-soft:hover {
    background-color: #dfe9eb;
    color: #132b31;
}

.btn-outline-primary {
    background: #eaf6ff;
    color: #145ea8;
    border: 1px solid #b7d9ff;
}

.btn-outline-primary:hover {
    background: #d9ecff;
    color: #0b4f90;
}

.btn-outline-danger {
    background: #fff1f2;
    color: #b42331;
    border: 1px solid #fecdd3;
}

.btn-outline-danger:hover {
    background: #ffe4e6;
    color: #991b1b;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms */
.form-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1.5px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-family: 'DM Sans', sans-serif;
    transition: var(--transition);
    background-color: white;
    width: 100%;
    min-height: 50px;
    height: 50px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.form-control::placeholder {
    color: var(--color-text-light);
    opacity: 0.7;
}

.form-text {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.form-check-input:focus {
    box-shadow: var(--shadow-sm);
    outline: none;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.app-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem;
}

.btn-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-color: var(--color-success);
}

.alert-danger {
    background-color: #fef2f2;
    color: #7f1d1d;
    border-color: var(--color-danger);
}

.alert-warning {
    background-color: #fffbeb;
    color: #78350f;
    border-color: var(--color-warning);
}

.alert-info {
    background-color: #eff6ff;
    color: #0c2340;
    border-color: var(--color-info);
}

/* Tabelas */
.table {
    background-color: white;
    border-collapse: collapse;
    margin-bottom: 0;
    width: 100%;
}

.table thead {
    background-color: var(--color-primary-light);
}

.table th {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    padding: 1rem 1.5rem;
}

.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.table tbody tr:hover {
    background-color: rgba(0, 54, 61, 0.05);
}

/* Pagination */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
}

.page-item.active .page-link {
    background-color: var(--color-primary);
    color: white;
}

.page-link {
    border: none;
    border-radius: var(--border-radius);
    color: var(--color-primary);
    background-color: white;
    transition: var(--transition);
}

.page-link:hover {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.page-link.active {
    background-color: var(--color-primary);
    color: white;
}

/* Badge */
.badge {
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
}

/* Progress */
.progress {
    height: 8px;
    border-radius: var(--border-radius);
    background-color: var(--color-border);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

/* Util */
.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-info { color: var(--color-info) !important; }
.text-muted { color: var(--color-text-light) !important; }

/* Responsivo */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    main {
        padding: 1rem 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Telas públicas: login, entrada na fila e acompanhamento */
body.public-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(0deg, #fff 0%, #fff 30%, #00243d 30%, #30AABC 100%);
}

body.public-auth-queue {
    justify-content: center;
    align-items: flex-start;
    min-height: 100dvh;
    overflow-y: auto;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 16% 12%, rgba(48, 170, 188, .18), transparent 30rem),
        linear-gradient(135deg, #f9fbfc 0%, #f3f7f8 100%);
}

body.public-auth-queue .auth-content,
body.public-auth-position .auth-content {
    width: 100%;
    padding: 0;
}

body.public-auth-position {
    align-items: flex-start;
    min-height: 100dvh;
    overflow-y: auto;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
    background:
        radial-gradient(circle at 16% 12%, rgba(48, 170, 188, .18), transparent 30rem),
        linear-gradient(135deg, #f9fbfc 0%, #f3f7f8 100%);
}

main.public-queue-shell {
    padding: 0;
}

.public-queue-shell {
    margin-inline: auto;
    width: min(100%, 1080px);
    min-height: min(680px, calc(100dvh - 2.5rem));
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(380px, .72fr);
    overflow: hidden;
    border: 1px solid rgba(0,36,61,.08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 36, 61, .14);
}

.public-queue-brand {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 44px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(8, 46, 54, .98), rgba(0, 36, 61, .96));
    color: #fff;
}

.public-queue-brand::before,
.public-queue-brand::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
}

.public-queue-brand::before {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -90px;
    background: rgba(48, 170, 188, .24);
}

.public-queue-brand::after {
    width: 240px;
    height: 240px;
    left: -80px;
    bottom: -80px;
    background: rgba(0, 166, 83, .18);
}

.public-queue-mark {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(145deg, #30AABC, #082e36);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .22);
}

.public-queue-mark img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.public-queue-brand .page-kicker {
    color: #30AABC;
}

.public-queue-brand h1 {
    max-width: 520px;
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.55rem);
    line-height: 1.05;
}

.public-queue-brand p {
    max-width: 430px;
    margin: 1rem 0 0;
    color: rgba(255,255,255,.72);
    font-size: 1rem;
}

.public-queue-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px;
    background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.99));
}

.public-queue-card-header {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1.4rem;
}

.public-queue-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #e8f4f6;
    color: #082e36;
}

.public-queue-card h2 {
    margin: 0;
    color: #17282e;
    font-size: clamp(1.55rem, 2.4vw, 2.1rem);
    line-height: 1.1;
}

.public-queue-card-header p {
    margin: .3rem 0 0;
    color: #667a81;
    font-weight: 600;
}

.public-field {
    margin-bottom: 1rem;
}

.public-queue-card .form-control,
.public-queue-card .form-select {
    min-height: 54px;
    height: 54px;
    border: 1px solid #dbe7ea;
    border-radius: 12px;
    background: #fbfdfe;
    color: #17282e;
    font-weight: 700;
    font-size: .95rem;
}

.public-queue-card .form-control:focus,
.public-queue-card .form-select:focus {
    border-color: rgba(48, 170, 188, .75);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(48, 170, 188, .13);
}

.public-priority-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-top: 1.25rem;
}

.public-priority-btn {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem;
    border: 1px solid rgba(0,36,61,.08);
    border-radius: 14px;
    background: #fff;
    color: #17282e;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 12px 28px rgba(0,36,61,.07);
}

.public-priority-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(0,36,61,.12);
}

.public-priority-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #dbeafe;
    color: #1d4ed8;
}

.public-priority-btn.is-priority .public-priority-icon {
    background: #fee2e2;
    color: #b91c1c;
}

.public-priority-btn strong {
    display: block;
    color: #17282e;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.public-priority-btn small {
    color: #667a81;
    font-weight: 700;
}

.public-note-card {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-top: 1.25rem;
    padding: 1rem;
    border-radius: 12px;
    background: #eff6ff;
    color: #0c2340;
    font-size: .9rem;
    font-weight: 700;
}

.public-note-card i {
    color: #2563eb;
    margin-top: .15rem;
}

.public-submit-btn {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .95rem 1.2rem;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #00243d 0%, #30AABC 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 14px 30px rgba(48, 170, 188, .22);
}

.public-submit-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(48, 170, 188, .28);
}

.public-note-card + .public-submit-btn {
    margin-top: 1rem;
}

.public-position-card {
    gap: 1.25rem;
}

.public-ticket-display {
    padding: 1.4rem;
    border-radius: 16px;
    background: #f7fbfc;
    text-align: center;
}

.public-ticket-display span {
    display: block;
    color: #667a81;
    font-weight: 800;
}

.public-ticket-display strong {
    display: block;
    margin: .35rem 0 .7rem;
    color: #082e36;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(4rem, 10vw, 6.6rem);
    line-height: 1;
}

.public-priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .5rem 1rem;
    border-radius: 999px;
    font-weight: 900;
}

.public-priority-badge.is-normal {
    background: #dbeafe;
    color: #1d4ed8;
}

.public-priority-badge.is-priority {
    background: #fee2e2;
    color: #b91c1c;
}

.public-ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.public-ticket-info {
    min-height: 112px;
    padding: 1rem;
    border: 1px solid rgba(0,36,61,.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0,36,61,.06);
}

.public-ticket-info i {
    color: #30AABC;
    margin-bottom: .65rem;
}

.public-ticket-info span {
    display: block;
    color: #667a81;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.public-ticket-info strong {
    display: block;
    margin-top: .2rem;
    color: #17282e;
    font-family: 'Poppins', sans-serif;
    font-size: .98rem;
}

.login-container,
.queue-container,
.position-container {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 18px 48px rgba(0, 36, 61, 0.18);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.login-header,
.queue-header,
.position-header {
    background: linear-gradient(135deg, #00243d 0%, #30AABC 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    text-align: center;
}

.login-header h1,
.queue-header h1,
.position-header h1 {
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.position-header h1 {
    font-size: 1.5rem;
}

.login-header p,
.queue-header p,
.position-header p {
    color: rgba(255,255,255,.92);
    margin-bottom: 0;
}

.login-header p {
    font-size: .9rem;
}

.queue-header p,
.position-header p {
    font-size: 1.5rem;
}

.public-card-logo {
    height: 40px;
    padding-right: 5px;
}

.login-body,
.queue-body {
    padding: 2rem 1.5rem;
}

.position-body {
    padding: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
}

.btn-login {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, #00243d 0%, #30AABC 50%, #D1F470 100%);
    color: #fff;
}

.btn-login:hover {
    background: linear-gradient(135deg, #D1F470 0%, #30AABC 50%, #00243d 100%);
    color: #fff;
}

.user-type-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.user-type-tab {
    flex: 1;
    min-height: 48px;
    padding: .75rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--color-border);
    background: #fff;
    color: #596b72;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.user-type-tab.active {
    background: #30AABC;
    color: #fff;
    border-color: #30AABC;
}

.icon-input {
    position: relative;
}

.icon-input i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #30AABC;
    pointer-events: none;
}

.icon-input .form-control {
    padding-left: 2.75rem;
}

.queue-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.queue-btn {
    min-height: 142px;
    padding: 1.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-size: .96rem;
}

.queue-btn-normal {
    background: linear-gradient(135deg, #3985ff 0%, #1f4db9 100%);
}

.queue-btn-normal:hover {
    background: linear-gradient(135deg, #153e9f 0%, #2051c4 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(31, 77, 185, .22);
}

.queue-btn-priority {
    background: linear-gradient(135deg, #f84d4d 0%, #dc2626 100%);
}

.queue-btn-priority:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #d42e2e 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(239, 68, 68, .22);
}

.queue-btn i {
    font-size: 1.5rem;
}

.badge-info {
    display: block;
    font-size: .75rem;
    margin-top: .25rem;
    opacity: .8;
    font-weight: 600;
    color: #132b31;
    background: rgba(255,255,255,.8);
    padding: .25rem 1rem;
    border-radius: 999px;
}

.public-note {
    font-size: .9rem;
}

.position-display,
.info-box,
.phone-display {
    background: #f2f6f7;
    border-radius: var(--border-radius);
}

.position-display {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.position-label {
    color: #667a81;
    margin-bottom: 1rem;
    font-weight: 600;
}

.position-number {
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    color: #17494D;
    line-height: 1;
    margin-bottom: 1rem;
}

.position-suffix {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #20272B;
}

.priority-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    padding: .5rem 1rem;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-top: 1rem;
    font-size: .9rem;
}

.priority-badge.normal {
    background: linear-gradient(135deg, #3985ff 0%, #1f4db9 100%);
}

.info-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.info-box {
    padding: 1.5rem;
}

.info-box i {
    color: #30AABC;
    font-size: 1.5rem;
    margin-bottom: .5rem;
}

.info-box h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #20272B;
    font-size: 1rem;
    margin-bottom: .5rem;
}

.info-box p {
    color: #667a81;
    font-size: .9rem;
    margin-bottom: 0;
}

.phone-display {
    padding: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #30AABC;
    margin-bottom: 1.5rem;
}

.clock {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #30AABC;
}

@media (max-width: 560px) {
    body.public-auth-queue,
    body.public-auth-position {
        display: block;
        padding: 0;
    }

    main.public-queue-shell {
        padding: 0;
    }

    .public-queue-shell {
        min-height: 0;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .public-queue-brand {
        min-height: 280px;
        padding: 28px;
    }

    .public-queue-brand h1 {
        font-size: 2rem;
    }

    .public-queue-card {
        padding: 28px 20px 36px;
    }

    .public-priority-grid,
    .public-ticket-info-grid {
        grid-template-columns: 1fr;
    }

    .queue-options,
    .info-sections {
        grid-template-columns: 1fr;
    }

    .position-number {
        font-size: 3.2rem;
    }
}

/* App Shell - sidebar admin/cliente */
body.app-shell {
    display: block;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(48, 170, 188, 0.12), transparent 28rem),
        linear-gradient(180deg, #f7fafb 0%, #eef4f5 100%);
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    width: 280px;
    padding: 1.1rem;
    background: #082e36;
    color: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 24px 0 60px rgba(0, 36, 61, 0.18);
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    color: #fff;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #30AABC 0%, #00243d 100%);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

.sidebar-brand-mark img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.sidebar-brand strong {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    line-height: 1.1;
}

.sidebar-brand small {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: .78rem;
    margin-top: .15rem;
}

.sidebar-close {
    display: none;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--border-radius);
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
}

.sidebar-section-label {
    color: rgba(255,255,255,.48);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .85rem .75rem .45rem;
}

.sidebar-nav {
    display: grid;
    gap: .25rem;
}

.sidebar-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem .75rem;
    border-radius: var(--border-radius);
    color: rgba(255,255,255,.82);
    font-weight: 600;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(48,170,188,.95), rgba(0,166,83,.82));
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

.sidebar-link-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link-danger {
    color: #fecaca;
}

.sidebar-status {
    margin-top: auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .8rem .85rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.86);
    font-size: .86rem;
    font-weight: 700;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
}

.sidebar-status.is-online {
    color: #86efac;
}

.sidebar-status.is-online .status-dot {
    box-shadow: 0 0 0 5px rgba(134, 239, 172, .16);
}

.sidebar-status.is-offline {
    color: #fca5a5;
}

.sidebar-status.is-offline .status-dot {
    box-shadow: 0 0 0 5px rgba(252, 165, 165, .16);
}

.app-frame {
    min-height: 100vh;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 2rem;
    background: rgba(247, 250, 251, .88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(0,36,61,.08);
}

.sidebar-toggle,
.topbar-button,
.topbar-avatar {
    min-width: 42px;
    height: 42px;
    border: 1px solid rgba(0,36,61,.1);
    border-radius: var(--border-radius);
    background: #fff;
    color: var(--color-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 36, 61, .07);
}

.sidebar-toggle {
    display: none;
}

.topbar-title {
    min-width: 0;
    margin-right: auto;
}

.topbar-title span {
    display: block;
    color: var(--color-text-light);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.topbar-title strong {
    display: block;
    color: var(--color-secondary);
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.topbar-button {
    padding: 0 .85rem;
    font-weight: 700;
}

.app-content {
    flex: 1;
    padding: 2rem;
}

.content-container {
    width: min(100%, 1320px);
    margin-inline: auto;
}

.app-shell footer {
    display: none;
}

.site-footer {
    background-color: var(--color-primary-dark);
    color: white;
    padding: 2rem 0;
}

.app-shell h1,
.app-shell h2 {
    color: #132b31;
}

.app-shell .container,
.app-shell .container-fluid {
    width: 100%;
    padding: 0;
}

.app-shell .card {
    border: 1px solid rgba(0,36,61,.07);
    box-shadow: 0 12px 30px rgba(0,36,61,.07);
}

.app-shell .card:hover {
    transform: none;
    box-shadow: 0 16px 38px rgba(0,36,61,.1);
}

.app-shell .card-header {
    background: #fff;
    border-bottom: 1px solid rgba(0,36,61,.07);
    padding: 1.15rem 1.35rem;
}

.app-shell .table th {
    color: #41575f;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #f6fafb;
}

.app-shell .btn {
    border-radius: var(--border-radius);
}

.app-shell .btn-primary {
    background: #082e36;
}

.app-shell .btn-primary:hover {
    background: #30AABC;
}

.app-shell .container.py-5,
.app-shell .container-fluid.py-5 {
    padding-block: 0 !important;
}

.app-shell .row.mb-4:first-child {
    align-items: center;
    margin-bottom: 1.35rem !important;
}

.app-shell .row.mb-4:first-child h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.app-shell .row.mb-4:first-child h2 i {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: linear-gradient(135deg, #082e36, #30AABC);
    font-size: 1rem;
}

.app-shell .card-body.p-0 {
    overflow-x: auto;
}

.app-shell .card .fa-3x {
    font-size: 2.2rem;
    opacity: .95;
}

.app-shell .card-body .d-flex.justify-content-between > div:first-child p {
    color: #6b7f86;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.app-shell .card-body .d-flex.justify-content-between > div:first-child h3 {
    font-size: 2rem;
}

.app-shell .badge {
    border-radius: 999px !important;
    padding: .42rem .7rem !important;
}

.app-shell .table {
    min-width: 760px;
}

.app-shell .table td,
.app-shell .table th {
    vertical-align: middle;
    text-align: left;
}

.app-shell .card-header h5 {
    text-align: left;
}

.app-shell .pagination {
    justify-content: center;
}

.app-shell .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .75rem;
    box-shadow: 0 8px 18px rgba(0,36,61,.06);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card .card-body {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.metric-card-top {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: .85rem;
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.metric-icon-primary { background: #e8f4f6; color: #082e36; }
.metric-icon-success { background: #dcfce7; color: #047857; }
.metric-icon-info { background: #dbeafe; color: #2563eb; }
.metric-icon-warning { background: #fef3c7; color: #b45309; }

.metric-title {
    margin: 0;
    text-align: right;
    color: #667a81;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.metric-value {
    margin: 0;
    text-align: right;
    color: #132b31;
    font-family: 'Poppins', sans-serif;
    font-size: 2.25rem;
    line-height: 1;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}

.app-shell form .btn:not(.btn-sm),
.form-actions .btn {
    min-height: 50px;
    padding: 0 1.35rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 980px) {
    .app-sidebar {
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-close,
    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-frame {
        margin-left: 0;
    }

    .app-topbar {
        padding-inline: 1rem;
    }

    .app-content {
        padding: 1.15rem;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 990;
        background: rgba(0, 20, 28, .46);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        display: block;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .topbar-button span {
        display: none;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .topbar-title span {
        display: none;
    }

    .topbar-title strong {
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

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

    .page-actions {
        justify-content: stretch;
    }

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

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

/* Telas do cliente */
.start-panel {
    background: #fff;
    border: 1px solid rgba(0,36,61,.07);
    border-radius: var(--border-radius);
    box-shadow: 0 14px 36px rgba(0,36,61,.08);
    max-width: 560px;
    width: 100%;
    margin: 2rem auto;
    overflow: hidden;
}

.start-panel-header {
    background: linear-gradient(135deg, #00243d 0%, #30AABC 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    text-align: center;
}

.start-panel-header h1 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.start-panel-header p {
    color: rgba(255,255,255,.92);
    font-size: 1.35rem;
    margin-bottom: 0;
}

.start-panel-body {
    padding: 2rem 1.5rem;
}

.start-panel-lead {
    color: #667a81;
    font-size: 1rem;
    text-align: center;
}

.start-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.start-btn {
    min-height: 160px;
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .65rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.start-btn:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0,36,61,.16);
}

.start-btn-player {
    background: linear-gradient(135deg, #3985ff 0%, #1f4db9 100%);
}

.start-btn-service {
    background: linear-gradient(135deg, #12a97a 0%, #047857 100%);
}

.start-btn i {
    font-size: 2.15rem;
}

.btn-description {
    display: block;
    font-size: .85rem;
    opacity: .9;
    font-weight: 600;
}

.start-info-box,
.profile-security-note {
    background-color: #eff6ff;
    color: #0c2340;
    border: 0;
    border-left: 4px solid #3b82f6;
    border-radius: var(--border-radius);
}

.start-info-box {
    padding: 1rem;
    margin-top: 1.75rem;
    font-size: .92rem;
}

.service-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: #fff;
    border: 1px solid rgba(0,36,61,.07);
    border-radius: var(--border-radius);
    box-shadow: 0 12px 30px rgba(0,36,61,.07);
    padding: 2rem;
    text-align: center;
}

.service-card-icon {
    color: #17494D;
    font-size: 2.6rem;
    margin-bottom: 1rem;
}

.service-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-action {
    background: linear-gradient(135deg, #00243d 0%, #30AABC 100%);
    border: 0;
    color: #fff;
    min-height: 52px;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.96rem;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
}

.btn-action:hover {
    background: linear-gradient(135deg, #30AABC 0%, #00243d 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(48, 170, 188, .22);
}

.btn-danger-action {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    min-height: 52px;
    padding: 1rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.96rem;
    line-height: 1.2;
    cursor: pointer;
    transition: var(--transition);
}

.btn-danger-action:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(239, 68, 68, .2);
}

.btn-join {
    border: 1px solid #30AABC;
    color: #00243d;
    padding: .9rem 1.1rem;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-join:hover {
    background: #30AABC;
    color: #fff;
}

.service-instructions {
    color: #667a81;
    margin-bottom: 1rem;
}

.service-instructions-list {
    font-size: .9rem;
    text-align: left;
    margin-bottom: 1rem;
}

.service-warning {
    color: #b91c1c;
    font-size: .82rem;
    font-weight: 700;
}

.profile-label {
    color: #20272B;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.hidden {
    display: none !important;
}

.badge-success-soft {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.badge-danger-soft {
    background-color: #fee2e2 !important;
    color: #7f1d1d !important;
}

.btn-dark-soft {
    background-color: #00243d;
    color: #fff;
    border: 0;
    border-radius: var(--border-radius);
    padding: .42rem .8rem;
    font-weight: 700;
    text-decoration: none;
}

.btn-dark-soft:hover {
    background-color: #30AABC;
    color: #fff;
}

.upload-progress-bar {
    width: 0%;
    background: linear-gradient(135deg, #00243d 0%, #30AABC 100%);
}

.media-modal {
    padding: 0;
    border: 0;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0,0,0,.22);
}

.media-modal::backdrop {
    background: rgba(0, 20, 28, .55);
}

.media-modal-preview {
    max-width: 60vw;
    max-height: 60vh;
    display: block;
}

.media-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #00243d;
    color: #fff;
    border: 0;
    border-radius: var(--border-radius);
    padding: .65rem 1rem;
    cursor: pointer;
}

tr.is-removing {
    opacity: .5;
    transition: opacity .3s ease;
}

/* Refinamento visual admin - linha do novo login */
.app-shell {
    --app-panel: #082e36;
    --app-panel-soft: #0d3b43;
    --app-accent: #30AABC;
    --app-green: #00A653;
    --app-ink: #17282e;
    --app-muted: #667a81;
    --app-line: #dbe7ea;
    --app-surface: #ffffff;
    --app-soft: #f7fbfc;
    --app-shadow: 0 18px 50px rgba(0, 36, 61, .09);
}

body.app-shell {
    background:
        radial-gradient(circle at 14% 8%, rgba(48, 170, 188, .13), transparent 30rem),
        linear-gradient(135deg, #f9fbfc 0%, #eef4f5 100%);
}

.app-sidebar {
    padding: 1.15rem;
    background: linear-gradient(145deg, rgba(8, 46, 54, .98), rgba(0, 36, 61, .98));
}

.sidebar-brand-mark {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    background: linear-gradient(145deg, var(--app-accent), var(--app-panel));
    box-shadow: 0 18px 36px rgba(0, 0, 0, .22);
}

.sidebar-brand strong {
    font-size: 1.18rem;
}

.sidebar-link {
    min-height: 46px;
    border-radius: var(--border-radius);
    font-weight: 700;
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, var(--app-panel-soft), var(--app-accent));
    box-shadow: 0 18px 34px rgba(0, 0, 0, .18);
}

.sidebar-status {
    min-height: 50px;
    border-radius: var(--border-radius);
    background: rgba(255,255,255,.08);
}

.app-topbar {
    min-height: 76px;
    background: rgba(249, 251, 252, .88);
    border-bottom: 1px solid rgba(0,36,61,.07);
}

.topbar-title span {
    letter-spacing: .08em;
}

.topbar-title strong {
    color: var(--app-ink);
    font-size: 1.1rem;
}

.sidebar-toggle,
.topbar-avatar {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 24px rgba(0, 36, 61, .08);
}

.app-content {
    padding: 2.15rem;
}

.content-container {
    width: min(100%, 1340px);
}

.page-hero,
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
}

.page-hero {
    margin-bottom: 1.5rem;
}

.section-heading {
    margin: .25rem 0 1rem;
}

.page-kicker {
    display: block;
    margin-bottom: .35rem;
    color: var(--app-accent);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.page-hero h2,
.section-heading h4 {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0;
    color: var(--app-ink);
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.12;
}

.section-heading h4 {
    font-size: clamp(1.15rem, 1.4vw, 1.45rem);
}

.page-hero h2 i {
    width: 46px;
    height: 46px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    background: linear-gradient(145deg, var(--app-panel), var(--app-accent));
    font-size: 1rem;
    box-shadow: 0 16px 28px rgba(8, 46, 54, .18);
}

.page-hero h2 i.me-2 {
    margin-right: 0 !important;
}

.page-hero p {
    max-width: 680px;
    margin: .6rem 0 0;
    color: var(--app-muted);
    font-size: .98rem;
}

.page-hero-action {
    flex: 0 0 auto;
}

.app-shell .card,
.empty-state,
.service-card,
.start-panel {
    border: 1px solid rgba(0,36,61,.08);
    border-radius: 14px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.app-shell .card {
    overflow: hidden;
}

.app-shell .card:hover {
    transform: none;
    box-shadow: 0 22px 56px rgba(0,36,61,.12);
}

.app-shell .card-header {
    min-height: 62px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
    border-bottom: 1px solid rgba(0,36,61,.08);
    padding: 1.1rem 1.35rem;
}

.app-shell .card-header h5,
.app-shell .card-header h3 {
    color: var(--app-ink);
    font-size: 1rem;
}

.app-shell .card-header i {
    color: var(--app-accent);
}

.app-shell .table {
    min-width: 760px;
}

.app-shell .table th {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0,36,61,.08);
    background: #f7fbfc;
    color: #41575f;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.app-shell .table td {
    padding: 1.05rem 1.25rem;
    border-bottom: 1px solid rgba(0,36,61,.07);
    color: #243940;
}

.app-shell .table tbody tr:hover {
    background: #f7fbfc;
}

.app-shell .table tbody tr:last-child td {
    border-bottom: 0;
}

.table-card .card-body {
    background: #fff;
}

.app-shell .btn {
    border-radius: var(--border-radius);
    font-weight: 800;
}

.app-shell .btn-primary {
    min-height: 46px;
    background: linear-gradient(135deg, var(--app-panel), var(--app-accent));
    color: #fff;
    box-shadow: 0 14px 26px rgba(8, 46, 54, .18);
}

.app-shell .btn-primary:hover {
    background: linear-gradient(135deg, var(--app-accent), var(--app-panel));
    color: #fff;
}

.btn-secondary-soft {
    min-height: 46px;
    background: #eef5f6;
    color: #273f46;
}

.btn-secondary-soft:hover {
    background: #dfeaec;
    color: var(--app-ink);
}

.btn-danger {
    min-height: 46px;
    background: #ef4444;
}

.btn-dark-soft,
.app-shell .btn-sm {
    border-radius: var(--border-radius);
    font-weight: 800;
}

.btn-dark-soft {
    background: #eef5f6;
    color: var(--app-panel);
}

.btn-dark-soft:hover {
    background: var(--app-panel);
    color: #fff;
}

.app-shell .btn-outline-primary,
.app-shell .btn-outline-danger {
    min-height: 38px;
    border-radius: var(--border-radius);
    font-weight: 800;
}

.app-shell .form-label {
    color: #2f444b;
    font-size: .88rem;
    font-weight: 800;
}

.app-shell .form-control,
.app-shell .form-select {
    min-height: 54px;
    height: 54px;
    border: 1px solid var(--app-line);
    border-radius: var(--border-radius);
    background: #fbfdfe;
    color: var(--app-ink);
    font-weight: 600;
    font-size: .96rem;
}

.app-shell textarea.form-control {
    height: auto;
    min-height: 116px;
    resize: vertical;
}

.app-shell input[type="file"].form-control {
    height: auto;
    padding-block: .85rem;
}

.app-shell .form-control:focus,
.app-shell .form-select:focus {
    border-color: rgba(48, 170, 188, .75);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(48, 170, 188, .13);
}

.form-card .card-body {
    padding: 1.6rem;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: .2rem 0 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0,36,61,.08);
}

.form-section-title:not(:first-of-type) {
    margin-top: 1.6rem;
}

.form-section-title span {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #e8f4f6;
    color: var(--app-panel);
}

.form-section-title strong {
    display: block;
    color: var(--app-ink);
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
}

.form-section-title small {
    display: block;
    margin-top: .15rem;
    color: var(--app-muted);
    font-weight: 600;
}

.app-shell .alert {
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 24px rgba(0, 36, 61, .06);
    font-weight: 700;
}

.app-shell .badge {
    border-radius: 999px !important;
    padding: .42rem .72rem !important;
    font-size: .76rem;
    font-weight: 900;
}

.badge-success-soft {
    background-color: #dcfce7 !important;
    color: #047857 !important;
}

.badge-danger-soft {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
}

.empty-state {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: 2rem;
    text-align: center;
}

.empty-state i {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--app-surface);
    font-size: 1.35rem;
}

.empty-state strong {
    color: var(--app-ink);
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
}

.empty-state span {
    max-width: 520px;
    color: var(--app-muted);
    font-weight: 600;
}

.empty-state .btn {
    margin-top: .6rem;
}

.empty-state-table {
    min-height: 190px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.metric-card {
    position: relative;
}

.metric-card .card-body {
    min-height: 142px;
    padding: 1.35rem;
}

.metric-icon {
    border-radius: 14px;
}

.metric-icon-primary { background: #e8f4f6; color: var(--app-panel); }
.metric-icon-success { background: #dcfce7; color: #047857; }
.metric-icon-info { background: #dbeafe; color: #2563eb; }
.metric-icon-warning { background: #fef3c7; color: #b45309; }

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

.metric-value {
    color: var(--app-ink);
}

.app-shell .pagination {
    gap: .45rem;
}

.app-shell .page-link {
    min-width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    color: var(--app-panel);
    font-weight: 800;
}

.app-shell .page-item.active .page-link {
    background: linear-gradient(135deg, var(--app-panel), var(--app-accent));
    color: #fff;
}

.start-panel {
    max-width: 620px;
    border-radius: 18px;
}

.start-panel-header {
    background: linear-gradient(145deg, rgba(8, 46, 54, .98), rgba(0, 36, 61, .98));
}

.start-btn,
.btn-action,
.btn-join {
    border-radius: var(--border-radius);
}

.start-btn-player,
.btn-action {
    background: linear-gradient(135deg, var(--app-panel), var(--app-accent));
}

.start-btn-service {
    background: linear-gradient(135deg, var(--app-green), #047857);
}

.start-page {
    display: grid;
    gap: 1.5rem;
}

.start-home-card {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: stretch;
    min-height: 360px;
    padding: 1.45rem;
    border: 1px solid rgba(0,36,61,.08);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(8, 46, 54, .98), rgba(0, 36, 61, .96));
    box-shadow: var(--app-shadow);
    color: #fff;
    overflow: hidden;
}

.start-home-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.4rem;
}

.start-home-copy .page-kicker {
    color: var(--app-accent);
}

.start-home-copy h3 {
    max-width: 520px;
    margin: 0;
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.08;
}

.start-home-copy p {
    max-width: 460px;
    margin: 1rem 0 0;
    color: rgba(255,255,255,.72);
    font-size: 1rem;
}

.start-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.start-action-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 280px;
    padding: 1.35rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 16px;
    background: rgba(255,255,255,.08);
    color: #fff;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .12);
}

.start-action-card:hover {
    color: #fff;
    background: rgba(255,255,255,.12);
    transform: translateY(-2px);
}

.start-action-icon {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    color: var(--app-panel);
    font-size: 1.35rem;
}

.start-action-card strong {
    display: block;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
}

.start-action-card small {
    display: block;
    margin-top: .25rem;
    color: rgba(255,255,255,.68);
    font-weight: 700;
}

.start-action-player .start-action-icon {
    color: #1d4ed8;
}

.start-action-service .start-action-icon {
    color: #047857;
}

.service-grid {
    align-items: stretch;
}

.service-grid > .card,
.service-grid > .service-support-grid {
    height: 100%;
}

.service-grid > .card {
    display: flex;
    flex-direction: column;
}

.service-grid > .card .card-body {
    flex: 1;
}

.service-support-grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.service-support-grid > .card,
.service-support-grid > .service-card {
    height: 100%;
}

.service-card {
    border-radius: 14px;
}

.service-card-icon {
    color: var(--app-accent);
}

.service-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-table-wrap {
    border: 1px solid rgba(0,36,61,.08);
    border-radius: 12px;
}

.service-table {
    min-width: 980px;
}

.service-table .table-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(112px, 1fr));
    gap: .5rem;
    min-width: 352px;
}

.service-table .table-actions .btn {
    width: 100%;
    min-height: 40px;
    padding: 0 .75rem;
}

.service-alert[hidden] {
    display: none;
}

.service-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.service-pagination .pagination {
    margin: 0;
}

.service-card-actions {
    display: grid;
    gap: .75rem;
    margin-top: 1.2rem;
}

.queue-priority-normal {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.queue-priority-priority {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.queue-status-waiting {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.queue-status-called {
    background: #dcfce7 !important;
    color: #047857 !important;
}

.queue-status-served {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.queue-status-cancelled {
    background: #fee2e2 !important;
    color: #b91c1c !important;
}

.service-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    max-width: min(360px, calc(100vw - 44px));
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--app-panel);
    color: #fff;
    box-shadow: 0 18px 50px rgba(0, 36, 61, .22);
    font-weight: 800;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}

.service-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .service-grid {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .service-grid > .card,
    .service-grid > .service-support-grid {
        height: auto;
    }

    .service-support-grid {
        grid-template-columns: 1fr;
    }

    .start-home-card {
        grid-template-columns: 1fr;
    }

    .start-action-grid {
        grid-template-columns: 1fr;
    }

    .start-action-card {
        min-height: 190px;
    }
}

@media (max-width: 560px) {
    .app-content {
        padding: 1rem;
    }

    .page-hero,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .page-hero-action {
        width: 100%;
    }

    .page-hero h2 {
        font-size: 1.45rem;
    }

    .page-hero h2 i {
        width: 42px;
        height: 42px;
    }

    .start-options,
    .service-actions,
    .service-filters {
        grid-template-columns: 1fr;
    }

    .start-panel {
        margin-block: 0;
    }

    .start-home-card {
        padding: 1rem;
        border-radius: 14px;
    }

    .start-home-copy {
        padding: .6rem;
    }
}
