/* Grupo Lins — client portal theme (loaded after theme.css).
 * Light look: cream page, white card, gold accents and a dark header
 * strip (the logo has white lettering, so the header stays dark). */

:root {
    --lins-gold: #c9a063;
    --lins-gold-dark: #b8863a;
    --lins-gold-soft: rgba(201, 160, 99, 0.12);
    --lins-page: #f6f2ea;
    --lins-border: #e8e0d2;
    --lins-dark: #120e0a;
    --lins-dark-2: #1c1610;
    --lins-line: rgba(201, 160, 99, 0.35);
    --lins-text: #f3ece2;
    --lins-muted: #b9ad9c;
    --lins-ink: #2b241c;
}

body, input, button, select, textarea, .button {
    font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Office photo backdrop (cream stays as the fallback colour) */
html {
    background: var(--lins-page) url("../images/lins-bg.webp") center / cover no-repeat fixed;
}

body {
    background: transparent;
    min-height: 100vh;
}

/* Main card — wider than theme.css's 860px, with a side gutter */
#container {
    width: calc(100% - 48px);
    max-width: 1200px;
    border-radius: 14px;
    border: 1px solid var(--lins-border);
    box-shadow: 0 4px 18px rgba(43, 36, 28, 0.06);
}

/* Header */
#header {
    height: 84px;
    border-radius: 13px 13px 0 0;
    background: linear-gradient(180deg, var(--lins-dark-2), var(--lins-dark));
    border-bottom: 2px solid var(--lins-gold);
    color: var(--lins-muted);
}

#header #logo img {
    max-height: 56px;
    max-width: 240px;
}


#header p {
    color: var(--lins-muted);
}

#header a {
    color: var(--lins-gold);
}

#header a:hover {
    color: #f0c77f;
    border-bottom-color: #f0c77f;
}

/* Navigation */
#nav {
    background: #faf6f0;
    border-top: none;
    border-bottom: 1px solid #efe6d8;
}

#nav li a {
    color: var(--lins-ink);
}

#nav li a:hover {
    background-color: #f1e7d6;
    color: var(--lins-gold-dark);
}

#nav li a.active {
    background-color: var(--lins-gold);
    color: #1a140d;
}

/* Typography */
a, .link {
    color: var(--lins-gold-dark);
}

a:hover, .link:hover {
    border-bottom-color: var(--lins-gold-dark);
}

h1 {
    color: var(--lins-ink);
}

h1::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--lins-gold);
}

/* Titles inside tables/threads should not get the underline */
table h1::after,
#ticketInfo h1::after {
    display: none;
}

/* Buttons */
.button,
.button:visited,
.green.button,
.green.button:visited,
.blue.button,
.blue.button:visited,
input[type=submit],
#clientLogin input[type=submit] {
    color: #1a140d;
    background: linear-gradient(180deg, var(--lins-gold), var(--lins-gold-dark));
    border: none;
    border-radius: 8px;
    text-shadow: none;
}

.button:hover,
.green.button:hover,
.blue.button:hover,
input[type=submit]:hover,
#clientLogin input[type=submit]:hover {
    color: #1a140d;
    background: linear-gradient(180deg, #e8b868, var(--lins-gold));
    box-shadow: 0 6px 18px rgba(220, 166, 86, 0.35);
}

input[type=reset],
input[type=button] {
    border-radius: 8px;
}

/* js/osticket.js paints submit text red (inline style) once a form changes,
 * as an "unsaved changes" hint; keep the gold button's dark text instead. */
input[type=submit] {
    color: #1a140d !important;
}

/* Botoes do formulario (Criar Chamado / Recomecar / Cancelar) */
p.buttons input[type=submit],
p.buttons input[type=reset],
p.buttons input[type=button] {
    font-family: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    padding: 10px 22px;
    margin: 0 4px;
}

p.buttons input[type=reset],
p.buttons input[type=button] {
    color: var(--lins-ink);
    background: #fff;
    border: 1px solid var(--lins-gold);
}

p.buttons input[type=reset]:hover,
p.buttons input[type=button]:hover {
    background: var(--lins-gold-soft);
}

/* Mobile: Criar Chamado ocupa a linha toda; Recomecar e Cancelar dividem
 * a linha de baixo com a mesma largura. */
@media (max-width: 700px) {
    p.buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    p.buttons input[type=submit],
    p.buttons input[type=reset],
    p.buttons input[type=button] {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        margin: 0;
        padding: 12px 10px;
        white-space: normal;
    }
    p.buttons input[type=submit] {
        flex-basis: 100%;
    }
}

/* Form fields */
input[type=text],
input[type=email],
input[type=tel],
input[type=number],
input[type=password],
select,
textarea {
    border-radius: 6px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--lins-gold);
    box-shadow: 0 0 0 3px rgba(220, 166, 86, 0.25);
}

/* Orientação (informational sub-subject) on the open-ticket form */
.orientacao {
    margin: 4px 0 8px;
    padding: 18px 20px;
    background: #faf7f1;
    border: 1px solid var(--lins-border);
    border-left: 4px solid var(--lins-gold);
    border-radius: 10px;
}

.orientacao-title {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--lins-ink);
}

.orientacao-body {
    line-height: 1.6;
    color: #3d342a;
}

.orientacao-field {
    margin: 0 0 12px;
}

.orientacao-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--lins-ink);
}

.orientacao-field input,
.orientacao-field select,
.orientacao-field textarea {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}

.orientacao-done {
    margin-bottom: 20px;
}

.orientacao-hint {
    margin: 14px 0 0;
    font-size: 13px;
    color: #8c8173;
}

/* Home page: only the company-link notice, using the full width */
#landing_page .main-content {
    max-width: none;
}

/* Ticket list / info tables */
#ticketTable th,
table.padded th {
    background: #faf6f0;
    color: var(--lins-ink);
}

/* Footer */
#footer {
    /* Light text over the photo backdrop */
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

#footer a {
    color: #e3c08a;
}


@media (max-width: 700px) {
    /* Floating card with a small gutter so the backdrop shows at the edges */
    #container {
        width: auto;
        margin: 12px;
        border: 1px solid var(--lins-border);
        border-radius: 16px;
        box-shadow: 0 6px 20px rgba(43, 36, 28, 0.08);
        /* Fill the screen so the white card doesn't end mid-page */
        min-height: calc(100vh - 88px);
        min-height: calc(100dvh - 88px);
    }

    /* Header: logo left, sign-in/user links right (wraps below if long) */
    #header {
        height: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px 16px;
        padding: 18px 20px;
    }
    #header > .pull-left,
    #header > .pull-right {
        float: none;
    }
    #header #logo {
        order: -1;
        display: flex;
        align-items: center;
        height: auto;
    }
    #header #logo .valign-helper {
        display: none;
    }
    #header #logo img {
        max-height: 48px;
        max-width: 160px;
    }
    #header .pull-right {
        text-align: right;
    }
    #header p {
        padding: 0;
        font-size: 13px;
        line-height: 1.6;
    }
    #header p:empty {
        display: none;
    }

    /* Nav: equal-width tabs, icon above label */
    #nav {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 12px 16px;
        white-space: normal;
    }
    #nav li {
        display: block;
        margin: 0;
    }
    #nav li a {
        display: block;
        height: auto;
        margin: 0;
        padding: 36px 6px 10px;
        font-size: 13px;
        line-height: 1.25;
        text-align: center;
        border-radius: 12px;
        background-position: center 12px;
    }

    #content {
        margin: 0 20px;
        padding: 28px 0 36px;
        min-height: 0;
    }

    /* Landing page: text first, then full-width action buttons */
    #landing_page {
        display: flex;
        flex-direction: column;
    }
    #landing_page .main-content {
        order: 1;
        max-width: none;
    }
    #landing_page .sidebar {
        order: 2;
        float: none;
        width: 100%;
        margin: 28px 0 0;
    }
    #landing_page .sidebar .front-page-button p {
        margin: 0 0 14px;
    }
    #landing_page .sidebar .front-page-button .button {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 16px;
        font-size: 16px;
        border-radius: 12px;
        text-align: center;
        box-sizing: border-box;
    }
    h1 {
        font-size: 23px;
        line-height: 1.3;
    }
    #landing_page h1 {
        margin-bottom: 18px;
    }
    #landing_page .main-content p {
        font-size: 15px;
        line-height: 1.7;
        color: #5b5247;
    }

    #footer {
        padding: 4px 20px 20px;
    }

    /* Check-status / sign-in box */
    #clientLogin {
        margin-top: 20px;
        padding: 20px 16px;
        background: #faf6f0;
        border: 1px solid #efe6d8;
        border-radius: 14px;
        box-shadow: none;
    }
    #clientLogin input[type=text],
    #clientLogin input[type=email],
    #clientLogin input[type=password] {
        padding: 11px 12px;
        margin-bottom: 14px;
        border: 1px solid #ddd2c2;
        border-radius: 10px;
        background: #fff;
    }
    #clientLogin input[type=submit] {
        width: 100%;
        padding: 13px 16px;
        font-size: 16px;
        font-weight: 600;
        border-radius: 10px;
    }
    .login-box {
        border-bottom-color: #efe6d8;
    }

    /* Avoid iOS zoom on focus */
    input[type=text],
    input[type=email],
    input[type=tel],
    input[type=number],
    input[type=password],
    select,
    textarea {
        font-size: 16px;
    }
}
