@font-face {
    font-family: "Roboto Condensed";
    src: url('../fonts/RobotoCondensed-Regular.ttf');
    font-weight: 400;
}

@font-face {
    font-family: "Roboto Condensed";
    src: url('../fonts/RobotoCondensed-Bold.ttf');
    font-weight: 700;
}

:root {
    --blue-950: #071528;
    --blue-900: #0b1b35;
    --blue-800: #142d4d;
    --blue-700: #1f436c;
    --gold-600: #956c39;
    --gold-500: #ad844e;
    --gold-400: #c6a36b;
    --surface: #ffffff;
    --surface-soft: #f5f6f8;
    --text: #10213a;
    --muted: #6c7788;
    --border: rgba(16, 33, 58, .12);
    --shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

* {
    box-sizing: border-box;
}

html,
body,
#layout,
#teste {
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 100%;
    margin: 0;
}

html,
body {
    overflow: hidden;
    font-family: "Roboto Condensed", Arial, sans-serif;
    background: var(--blue-950);
    color: var(--text);
}

body {
    min-height: 100vh;
}

#layout {
    position: fixed;
    inset: 0;
}

#teste {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 10%, rgba(198, 163, 107, .14), transparent 30%),
        linear-gradient(135deg, var(--blue-950) 0%, var(--blue-900) 58%, var(--blue-800) 100%);
}

.triagem-shell {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(14px, 1.8vh, 28px);
    padding: clamp(18px, 2vw, 38px);
}

.triagem-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 4px clamp(14px, 1.6vh, 24px);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.brand-title {
    font-size: clamp(24px, 2.2vw, 44px);
    font-weight: 700;
    letter-spacing: .14em;
}

.brand-subtitle,
.header-hint {
    margin-top: 4px;
    color: rgba(255, 255, 255, .65);
    font-size: clamp(14px, 1.1vw, 20px);
}

.header-hint {
    margin-top: 0;
    text-align: right;
}

.triagem-main {
    min-height: 0;
    overflow: hidden;
}

.page {
    display: none;
    height: 100%;
    min-height: 0;
}

.page.first {
    display: block;
}

.page-heading {
    color: #fff;
    text-align: center;
    margin: 0 auto clamp(16px, 2.5vh, 34px);
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 54px);
    font-weight: 700;
    line-height: 1.05;
}

.page-heading p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, .68);
    font-size: clamp(16px, 1.4vw, 24px);
}

.service-grid {
    display: grid;
    gap: clamp(12px, 1.4vw, 24px);
    align-content: start;
}

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

.service-button,
.priority-option,
.choice-card,
.nav-button {
    appearance: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.service-button {
    width: 100%;
    min-height: clamp(88px, 11vh, 150px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(18px, 2vw, 32px);
    border-radius: clamp(14px, 1.2vw, 22px);
    background: rgba(255, 255, 255, .97);
    color: var(--blue-900);
    box-shadow: var(--shadow);
    border-left: clamp(5px, .45vw, 8px) solid var(--gold-500);
    text-align: left;
    transition: transform .12s ease, background .12s ease;
}

.service-button:active,
.choice-card:active,
.priority-option:active {
    transform: scale(.985);
}

.service-name {
    font-size: clamp(20px, 1.75vw, 32px);
    font-weight: 700;
    line-height: 1.12;
}

.service-button .glyphicon {
    color: var(--gold-500);
    font-size: clamp(18px, 1.5vw, 28px);
    flex: 0 0 auto;
}

.choice-grid {
    height: calc(100% - 110px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 38px);
    align-items: stretch;
}

.choice-card {
    min-height: 260px;
    border-radius: clamp(18px, 1.5vw, 28px);
    background: rgba(255, 255, 255, .97);
    color: var(--blue-900);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: clamp(28px, 3vw, 54px);
}

.choice-card .glyphicon {
    font-size: clamp(52px, 6vw, 100px);
    color: var(--blue-700);
}

.choice-card strong {
    font-size: clamp(34px, 4vw, 68px);
}

.choice-card small {
    color: var(--muted);
    font-size: clamp(16px, 1.4vw, 24px);
}

.priority-card {
    border: clamp(4px, .4vw, 7px) solid var(--gold-500);
}

.priority-card .glyphicon,
.priority-card strong {
    color: var(--gold-600);
}

.priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: clamp(12px, 1.3vw, 22px);
    align-content: start;
    max-height: calc(100% - 110px);
    overflow: auto;
    padding: 4px;
}

.priority-option {
    min-height: clamp(72px, 8vh, 108px);
    border-radius: 16px;
    background: rgba(255, 255, 255, .97);
    color: var(--blue-900);
    border-left: 6px solid var(--gold-500);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .13);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: clamp(19px, 1.6vw, 29px);
    font-weight: 700;
    text-align: left;
}

.priority-option .glyphicon {
    color: var(--gold-500);
}

#printing {
    display: none;
    align-items: center;
    justify-content: center;
}

#printing[style*="display: block"] {
    display: flex !important;
}

.printing-card {
    width: min(900px, 88vw);
    background: rgba(255, 255, 255, .98);
    border-radius: clamp(20px, 2vw, 34px);
    box-shadow: var(--shadow);
    text-align: center;
    padding: clamp(34px, 5vw, 74px);
    border-top: 8px solid var(--gold-500);
}

.printing-kicker {
    color: var(--gold-600);
    font-size: clamp(20px, 1.7vw, 30px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.printing-ticket {
    margin-top: 10px;
    color: var(--blue-900);
    font-size: clamp(100px, 15vw, 240px);
    font-weight: 700;
    line-height: .95;
}

.printing-service {
    margin-top: 20px;
    color: var(--text);
    font-size: clamp(24px, 2.5vw, 44px);
    font-weight: 700;
}

.printing-message {
    margin-top: 18px;
    color: var(--muted);
    font-size: clamp(18px, 1.6vw, 28px);
}

.page-buttons {
    position: static;
    width: 100%;
    padding: 0;
    min-height: clamp(54px, 7vh, 82px);
}

.page-buttons .buttons {
    display: none;
    width: 100%;
}

.services-navigation {
    justify-content: space-between;
}

.nav-button {
    min-height: 54px;
    padding: 12px 22px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: clamp(16px, 1.25vw, 22px);
    font-weight: 700;
}

.nav-button-right {
    float: right;
}

/* Menu administrativo */
#menu {
    top: 10px;
    right: 10px;
    height: 50px;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, .82);
    position: fixed;
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .3);
    z-index: 99999;
}

#menu ul { padding: 0; margin: 0; }
#menu li { list-style: none; float: left; }
#menu li a {
    color: #ddd;
    padding: 0 15px;
    line-height: 50px;
    text-decoration: none;
    float: left;
}
#menu li a:hover { color: #fff; }

.tab-pane { padding: 20px 0; }

/* Modal legível em touchscreen */
.modal-dialog { width: min(680px, 94vw); }
.modal-content { border-radius: 12px; }
.form-control { min-height: 42px; }

/* Iframe de impressão continua invisível */
#frame-impressao {
    position: absolute;
    width: 0;
    height: 0;
    border: 0;
}

@media (max-width: 1100px), (max-aspect-ratio: 4/3) {
    .triagem-shell {
        padding: 16px;
        gap: 14px;
    }

    .header-hint {
        display: none;
    }

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

    .service-button {
        min-height: 78px;
    }
}

@media (max-width: 720px) {
    .brand-title {
        letter-spacing: .08em;
    }

    .choice-grid,
    .service-grid.columns-2,
    .service-grid.columns-3 {
        grid-template-columns: 1fr;
    }

    .choice-grid {
        height: auto;
    }

    .choice-card {
        min-height: 190px;
    }

    .brand-subtitle {
        display: none;
    }
}
