/* ===================================================
   Teep Custom Styles
   Melhorias de UX/UI — responsividade, formulários,
   hierarquia visual, botões e cards de ação.
   =================================================== */

/* ---- 1. Container fluido (responsividade base) ---- */
#container {
    max-width: 840px;
    width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   HOME PAGE — Redesign moderno
   ============================================================ */

/* Container full-width apenas na home */
body.page-home #container {
    max-width: 100%;
    width: 100%;
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    background: transparent;
}

body.page-home {
    background: #f0f4f8;
}

/* Header limpo na home — full width */
body.page-home #header {
    background: #fff;
    width: 100%;
    padding: 0 40px;
    border-bottom: 1px solid #e8edf2;
    box-sizing: border-box;
}

body.page-home #nav {
    display: none;
}

body.page-home #content {
    padding: 0;
    margin: 0;
    min-height: 0 !important;
    height: auto !important;
}

/* Hero section — cores da marca TEEP */
.home-hero {
    background: #1a2e24;
    background: -webkit-linear-gradient(135deg, #111a14 0%, #1e3328 45%, #2d5040 100%);
    background: linear-gradient(135deg, #111a14 0%, #1e3328 45%, #2d5040 100%);
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Círculos decorativos de fundo */
.home-hero::before,
.home-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.home-hero::before {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -100px;
}
.home-hero::after {
    width: 280px;
    height: 280px;
    bottom: -120px;
    left: -60px;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.home-hero-title {
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 14px;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.home-hero-sub {
    color: rgba(255,255,255,0.88);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

/* Cards de ação */
.home-cards-section {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 24px;
    max-width: 900px;
    margin: -40px auto 40px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.home-card {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    padding: 36px 28px 28px;
    text-decoration: none !important;
    color: #222 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    -webkit-transition: -webkit-transform 0.18s ease, box-shadow 0.18s ease;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    border-top: 4px solid transparent;
}

.home-card:hover {
    -webkit-transform: translateY(-4px);
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.15);
    text-decoration: none !important;
}

.home-card-blue {
    border-top-color: #4a7c5a;
}
.home-card-green {
    border-top-color: #2d5040;
}

.home-card-icon {
    font-size: 28px;
    margin-bottom: 14px;
    display: block;
}
.home-card-blue .home-card-icon { color: #4a7c5a; }
.home-card-green .home-card-icon { color: #2d5040; }

.home-card-title {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.home-card-desc {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    margin-bottom: 20px;
}

.home-card-cta {
    display: inline-block;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 18px;
    border-radius: 6px;
    color: #fff !important;
    -webkit-transition: opacity 0.15s ease;
    transition: opacity 0.15s ease;
}
.home-card-blue .home-card-cta  { background: #4a7c5a; }
.home-card-green .home-card-cta { background: #2d5040; }
.home-card:hover .home-card-cta { opacity: 0.85; }

/* Seção FAQ/KB */
.home-kb-section {
    max-width: 900px;
    margin: 0 auto 50px;
    padding: 0 24px;
}

.home-kb-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e6ed;
}

.home-kb-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 20px;
}

.home-kb-card {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 260px;
    flex: 1 1 260px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.home-kb-cat {
    font-weight: bold;
    color: #4a7c5a;
    margin-bottom: 12px;
    font-size: 13px;
}

.home-kb-article a {
    color: #333;
    font-size: 13px;
    text-decoration: none;
}
.home-kb-article a:hover {
    color: #00AEEF;
    text-decoration: underline;
}
.home-kb-article p {
    color: #888;
    font-size: 12px;
    margin: 2px 0 10px;
}

/* Footer centralizado na home */
body.page-home #footer {
    background: transparent;
}

/* ============================================================
   PÁGINAS INTERNAS (open, view, login) — page-inner
   ============================================================ */

body.page-inner,
body.page-inner-wide {
    background: #f0f4f8;
}

body.page-inner #container,
body.page-inner-wide #container {
    max-width: 100%;
    width: 100%;
    box-shadow: none;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    background: transparent;
}

/* Header full-width nas páginas internas */
body.page-inner #header,
body.page-inner-wide #header {
    background: #fff;
    width: 100%;
    padding: 0 40px;
    border-bottom: 1px solid #e8edf2;
    box-sizing: border-box;
}

/* Nav integrado ao header nas páginas internas */
body.page-inner #nav,
body.page-inner-wide #nav {
    max-width: 100%;
    margin: 0;
    padding: 2px 40px;
    background: #1e3328;
    border-top: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    -webkit-box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

body.page-inner #nav li a,
body.page-inner-wide #nav li a {
    color: rgba(255,255,255,0.75);
    background-image: none;
    padding-left: 12px;
}
body.page-inner #nav li a.active,
body.page-inner #nav li a:hover,
body.page-inner-wide #nav li a.active,
body.page-inner-wide #nav li a:hover {
    background-color: rgba(255,255,255,0.12);
    color: #fff;
}

/* Banner compacto nas páginas internas — topo do card */
body.page-inner .inner-page-banner,
body.page-inner-wide .inner-page-banner {
    background: #1e3328;
    background: -webkit-linear-gradient(135deg, #111a14 0%, #2d5040 100%);
    background: linear-gradient(135deg, #111a14 0%, #2d5040 100%);
    padding: 30px 36px 28px;
    text-align: left;
    margin: 0;
}

body.page-inner .inner-page-banner h1,
body.page-inner-wide .inner-page-banner h1 {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 6px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

body.page-inner .inner-page-banner p,
body.page-inner-wide .inner-page-banner p {
    color: rgba(255,255,255,0.80);
    font-size: 14px;
    margin: 0;
}

/* Card branco centralizado */
body.page-inner #content {
    max-width: 720px;
    margin: 24px auto 40px !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    -webkit-box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    overflow: hidden;
    box-sizing: border-box;
}

/* Card largo para tickets */
body.page-inner-wide #content {
    max-width: 980px;
    margin: 24px auto 40px !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    -webkit-box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    overflow: hidden;
    box-sizing: border-box;
}

/* Mensagens de erro/aviso dentro do card */
body.page-inner #content #msg_error,
body.page-inner #content #msg_notice,
body.page-inner #content #msg_warning,
body.page-inner-wide #content #msg_error,
body.page-inner-wide #content #msg_notice,
body.page-inner-wide #content #msg_warning {
    margin: 0;
    border-radius: 0;
    padding: 12px 36px;
}

body.page-inner #footer,
body.page-inner-wide #footer {
    background: transparent;
    margin-top: 20px;
}

/* ============================================================
   FORMULÁRIO DE ABERTURA DE TICKET (.open-ticket-form)
   ============================================================ */

.open-ticket-form {
    padding: 28px 36px;
}

.open-ticket-form .ticket-form-table {
    width: 100%;
    border-collapse: collapse;
}

.open-ticket-form .ticket-form-table td {
    padding: 6px 8px;
    vertical-align: top;
}

.open-ticket-form .ticket-form-table td:first-child {
    white-space: nowrap;
    font-weight: 600;
    color: #444;
    width: 160px;
    padding-right: 16px;
}

/* Seletor de assunto / Help Topic */
.open-ticket-form #topicId {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cdd5de;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #333;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

/* Rótulo "Help Topic" */
.open-ticket-form .form-header b {
    font-size: 14px;
    color: #2d5040;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 11px;
}

/* Captcha row */
.open-ticket-form .captchaRow td {
    padding-top: 12px;
}

/* Botões do formulário de ticket */
body.page-inner .buttons {
    padding: 20px 36px 28px;
    margin: 0;
    border-top: 1px solid #eee;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
}

body.page-inner .buttons input.btn {
    background: #4a7c5a;
    border-color: #4a7c5a;
    color: #fff;
    font-size: 14px;
    padding: 9px 22px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    -webkit-transition: background 0.2s;
}

body.page-inner .buttons input.btn:first-child {
    background: #4a7c5a;
    border-color: #4a7c5a;
}

body.page-inner .buttons input.btn:hover {
    background: #2d5040;
    border-color: #2d5040;
}

/* Padding do formulário de login dentro do card */
body.page-inner #clientLogin .login-form-wrapper {
    padding: 24px 36px 28px;
}

/* Botão de submit do login no card */
body.page-inner #clientLogin input.btn {
    background: #4a7c5a;
    border: none;
    color: #fff;
    padding: 9px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}
body.page-inner #clientLogin input.btn:hover {
    background: #2d5040;
}

/* Texto extra abaixo do form de accesslink */
body.page-inner #content > p {
    padding: 4px 36px 20px;
    margin: 0;
    color: #555;
    font-size: 13px;
}

/* Divisor HR dentro do card */
body.page-inner #content > form > hr {
    margin: 0;
    border: none;
    border-top: 1px solid #e8edf2;
}

/* Estilos de campos dentro do formulário dinâmico (dynamic-form) */
body.page-inner #ticketForm input[type=text],
body.page-inner #ticketForm input[type=email],
body.page-inner #ticketForm input[type=tel],
body.page-inner #ticketForm textarea {
    border: 1px solid #cdd5de;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
}

body.page-inner #ticketForm input[type=text]:focus,
body.page-inner #ticketForm input[type=email]:focus,
body.page-inner #ticketForm input[type=tel]:focus,
body.page-inner #ticketForm textarea:focus {
    outline: none;
    border-color: #4a7c5a;
    box-shadow: 0 0 0 3px rgba(74,124,90,0.12);
    -webkit-box-shadow: 0 0 0 3px rgba(74,124,90,0.12);
}

/* Responsivo: formulário de ticket */
@media (max-width: 560px) {
    .open-ticket-form {
        padding: 20px 16px;
    }
    .open-ticket-form .ticket-form-table td:first-child {
        width: auto;
    }
    body.page-inner .buttons {
        padding: 16px 16px 20px;
    }
    body.page-inner #content {
        margin: -28px 12px 28px !important;
    }
}

/* ============================================================
   PÁGINA DE CHAMADOS (tickets.php)
   ============================================================ */

/* Card mais largo para acomodar a tabela — já definido via page-inner-wide */

/* Container de conteúdo com padding */
.tickets-content {
    padding: 20px 28px 28px;
}

/* Barra de busca */
.tickets-content .search.well {
    background: #f6f8fa;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.tickets-content .search.well input[type=text] {
    border: 1px solid #cdd5de;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 13px;
    width: 200px;
}

.tickets-content .search.well input[type=submit] {
    background: #4a7c5a;
    border: none;
    color: #fff;
    padding: 6px 16px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
    margin-left: 4px;
}

.tickets-content .search.well input[type=submit]:hover {
    background: #2d5040;
}

.tickets-content .search.well select {
    border: 1px solid #cdd5de;
    border-radius: 5px;
    padding: 5px 8px;
    font-size: 13px;
}

/* Título "Chamados" com contador */
.tickets-content h1 {
    font-size: 18px;
    color: #1e3328;
    border-bottom: 2px solid #e4e9ef;
    padding-bottom: 8px;
    margin: 0 0 14px !important;
}

.tickets-content h1 a {
    color: #1e3328;
    text-decoration: none;
}

.tickets-content h1 a:hover {
    color: #4a7c5a;
}

.tickets-content .states a.state {
    color: #4a7c5a;
    font-weight: 600;
}

.tickets-content .states a.state.active {
    color: #1e3328;
    border-bottom: 2px solid #4a7c5a;
    padding-bottom: 2px;
}

/* Tabela de tickets */
#ticketTable {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 13px;
}

#ticketTable caption {
    font-size: 12px;
    color: #888;
    text-align: left;
    padding: 0 0 6px;
    caption-side: top;
}

#ticketTable thead tr {
    background: #f0f4f0;
    border-bottom: 2px solid #d0ddd5;
}

#ticketTable thead th {
    padding: 9px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #3a5a48;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

#ticketTable thead th a {
    color: #3a5a48;
    text-decoration: none;
}

#ticketTable thead th a:hover {
    color: #1e3328;
}

#ticketTable tbody tr {
    border-bottom: 1px solid #eef1ee;
    -webkit-transition: background 0.15s;
    transition: background 0.15s;
}

#ticketTable tbody tr:hover {
    background: #f5faf6;
}

#ticketTable tbody td {
    padding: 10px 12px;
    vertical-align: middle;
    color: #333;
}

#ticketTable tbody td a.Icon {
    color: #4a7c5a;
    font-weight: 600;
    text-decoration: none;
}

#ticketTable tbody td a.Icon:hover {
    color: #1e3328;
    text-decoration: underline;
}

/* Paginação */
.tickets-pagination {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

/* Responsivo: tabela de tickets */
@media (max-width: 700px) {
    .tickets-content {
        padding: 16px 12px 20px;
    }
    #ticketTable thead th:nth-child(4),
    #ticketTable thead th:nth-child(5),
    #ticketTable tbody td:nth-child(4),
    #ticketTable tbody td:nth-child(5) {
        display: none;
    }
    .tickets-content .search.well input[type=text] {
        width: 120px;
    }
}

/* ============================================================
   LOADING POPUP — Modernizado
   ============================================================ */

/* Overlay escurecido */
#overlay {
    background: rgba(10, 20, 14, 0.55) !important;
}

/* Caixa de loading centralizada */
#loading {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    -webkit-transform: translate(-50%, -50%) !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    min-width: 220px;
    height: auto !important;
    padding: 28px 36px !important;
    background: #fff !important;
    background-image: none !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28) !important;
    -webkit-box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28) !important;
    text-align: center;
    z-index: 3000;
}

/* Spinner CSS */
#loading::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 14px;
    border: 4px solid #d8ead0;
    border-top-color: #2d5040;
    border-radius: 50%;
    -webkit-animation: teep-spin 0.75s linear infinite;
    animation: teep-spin 0.75s linear infinite;
}

@-webkit-keyframes teep-spin {
    to { -webkit-transform: rotate(360deg); }
}
@keyframes teep-spin {
    to { transform: rotate(360deg); }
}

/* Título do loading */
#loading h4 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    color: #1e3328 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* Subtítulo */
#loading p {
    margin: 0 !important;
    color: #6b8c78 !important;
    font-size: 12px !important;
}

/* ---- 7. Botão de submit destacado ---- */
input.btn {
    background-color: #00AEEF;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    padding: 10px 28px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    -webkit-transition: background-color 0.2s ease;
    transition: background-color 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}
input.btn:hover {
    background-color: #0299d2;
}
input.btn:active {
    box-shadow: none;
    position: relative;
    top: 1px;
}

/* ---- 2. Formulário flex (substitui display:table-row inline) ---- */
.login-form-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
}
.login-form-wrapper .login-box {
    display: block;
}
.login-form-wrapper .login-side-info {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 180px;
    padding: 15px;
}
/* Sobrepõe display:table-cell no .instructions quando dentro de flex */
.login-form-wrapper .instructions {
    display: block;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 180px;
    padding-left: 2em;
    padding-right: 15px;
}

/* ---- 3. Link de agente mais discreto ---- */
.agent-link {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}
.agent-link a {
    color: #aaa;
}
.agent-link a:hover {
    color: #555;
}
.agent-link b {
    font-weight: normal;
}

/* ---- 4. "Esqueci minha senha" sempre visível ---- */
.forgot-link {
    display: inline-block;
    margin-left: 14px;
    font-size: 12px;
    color: #888;
    vertical-align: middle;
}
.forgot-link:hover {
    color: #444;
    text-decoration: underline;
}

/* ---- 6. Action cards na sidebar (páginas internas) ---- */
.action-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    -webkit-transition: -webkit-transform 0.15s ease, box-shadow 0.15s ease;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}
.action-card:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    color: #fff !important;
}
.action-card:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.card-icon {
    font-size: 22px;
    opacity: 0.9;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.card-text .card-title {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}
.card-text .card-desc {
    display: block;
    font-size: 11px;
    font-weight: normal;
    opacity: 0.88;
    margin-top: 3px;
}
.action-card.new-ticket {
    background: #00AEEF;
    background: -webkit-linear-gradient(135deg, #00AEEF, #0299d2);
    background: linear-gradient(135deg, #00AEEF, #0299d2);
}
.action-card.new-ticket:hover {
    background: -webkit-linear-gradient(135deg, #0299d2, #0185b5);
    background: linear-gradient(135deg, #0299d2, #0185b5);
}
.action-card.check-status {
    background: #5cb85c;
    background: -webkit-linear-gradient(135deg, #5cb85c, #4a9e4a);
    background: linear-gradient(135deg, #5cb85c, #4a9e4a);
}
.action-card.check-status:hover {
    background: -webkit-linear-gradient(135deg, #4a9e4a, #3a8a3a);
    background: linear-gradient(135deg, #4a9e4a, #3a8a3a);
}

/* ---- Responsividade Mobile ---- */
@media (max-width: 860px) {
    #container {
        width: 100%;
        box-shadow: none;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
    }
    body {
        background: #f5f5f5;
    }
    #header {
        height: auto;
        min-height: 60px;
        padding: 10px 15px;
    }
    #header p {
        width: auto;
    }
    #content {
        margin: 0 12px !important;
        min-height: 0 !important;
        height: auto !important;
    }
    #nav {
        height: auto;
        white-space: normal;
        margin: 0;
        padding: 4px 10px;
    }
    #nav li {
        display: inline-block;
    }
    #nav li a {
        font-size: 12px;
        padding-left: 8px;
        margin-bottom: 2px;
    }
    /* Home: empilhar cards */
    .home-cards-section {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        margin-top: -20px;
    }
    .home-card {
        max-width: 100%;
        width: 100%;
    }
    .home-hero-title {
        font-size: 24px;
    }
    .home-hero-sub {
        font-size: 14px;
    }
    .home-hero {
        padding: 40px 20px 60px;
    }
    /* Sidebar nas páginas internas */
    .sidebar.pull-right {
        float: none !important;
        width: auto !important;
        margin: 0 0 16px 0;
    }
    .main-content {
        width: auto !important;
    }
    /* Formulários: empilhar no mobile */
    .login-box {
        width: 100% !important;
        box-shadow: none !important;
        -webkit-box-shadow: none !important;
        -moz-box-shadow: none !important;
        box-sizing: border-box;
    }
    .login-form-wrapper {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    .login-form-wrapper .instructions,
    .login-form-wrapper .login-side-info {
        padding-left: 15px;
        padding-top: 8px;
    }
}

@media (max-width: 480px) {
    #header #logo img {
        max-height: 45px;
    }
    .action-card {
        padding: 12px 14px;
    }
    .home-kb-card {
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
    }
}

/* ---- 1. Container fluido (responsividade base) ---- */
#container {
    max-width: 840px;
    width: 100%;
    box-sizing: border-box;
}

/* ---- 7. Botão de submit destacado ---- */
input.btn {
    background-color: #00AEEF;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    padding: 10px 28px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    -webkit-transition: background-color 0.2s ease;
    transition: background-color 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}
input.btn:hover {
    background-color: #0299d2;
}
input.btn:active {
    box-shadow: none;
    position: relative;
    top: 1px;
}

/* ---- 2. Formulário flex (substitui display:table-row inline) ---- */
.login-form-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
}
.login-form-wrapper .login-box {
    display: block;
}
.login-form-wrapper .login-side-info {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 180px;
    padding: 15px;
}
/* Sobrepõe display:table-cell no .instructions quando dentro de flex */
.login-form-wrapper .instructions {
    display: block;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    min-width: 180px;
    padding-left: 2em;
    padding-right: 15px;
}

/* ---- 3. Link de agente mais discreto ---- */
.agent-link {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}
.agent-link a {
    color: #aaa;
}
.agent-link a:hover {
    color: #555;
}
.agent-link b {
    font-weight: normal;
}

/* ---- 4. "Esqueci minha senha" sempre visível ---- */
.forgot-link {
    display: inline-block;
    margin-left: 14px;
    font-size: 12px;
    color: #888;
    vertical-align: middle;
}
.forgot-link:hover {
    color: #444;
    text-decoration: underline;
}

/* ---- 6. Action cards na sidebar ---- */
.action-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    -webkit-transition: -webkit-transform 0.15s ease, box-shadow 0.15s ease;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    box-sizing: border-box;
}
.action-card:hover {
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
    color: #fff !important;
}
.action-card:active {
    -webkit-transform: translateY(0);
    transform: translateY(0);
}
.card-icon {
    font-size: 22px;
    opacity: 0.9;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}
.card-text .card-title {
    display: block;
    font-size: 14px;
    line-height: 1.3;
}
.card-text .card-desc {
    display: block;
    font-size: 11px;
    font-weight: normal;
    opacity: 0.88;
    margin-top: 3px;
}
.action-card.new-ticket {
    background: #00AEEF;
    background: -webkit-linear-gradient(135deg, #00AEEF, #0299d2);
    background: linear-gradient(135deg, #00AEEF, #0299d2);
}
.action-card.new-ticket:hover {
    background: -webkit-linear-gradient(135deg, #0299d2, #0185b5);
    background: linear-gradient(135deg, #0299d2, #0185b5);
}
.action-card.check-status {
    background: #5cb85c;
    background: -webkit-linear-gradient(135deg, #5cb85c, #4a9e4a);
    background: linear-gradient(135deg, #5cb85c, #4a9e4a);
}
.action-card.check-status:hover {
    background: -webkit-linear-gradient(135deg, #4a9e4a, #3a8a3a);
    background: linear-gradient(135deg, #4a9e4a, #3a8a3a);
}

/* ---- Responsividade Mobile ---- */
@media (max-width: 860px) {
    #container {
        width: 100%;
        box-shadow: none;
        -moz-box-shadow: none;
        -webkit-box-shadow: none;
    }
    body {
        background: #f5f5f5;
    }
    #header {
        height: auto;
        min-height: 60px;
        padding: 10px 15px;
    }
    #header p {
        width: auto;
    }
    #content {
        margin: 0 12px !important;
        min-height: 0 !important;
        height: auto !important;
    }
    #nav {
        height: auto;
        white-space: normal;
        margin: 0;
        padding: 4px 10px;
    }
    #nav li {
        display: inline-block;
    }
    #nav li a {
        font-size: 12px;
        padding-left: 8px;
        margin-bottom: 2px;
    }
    /* Página inicial: sidebar acima do conteúdo */
    #landing_page {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: reverse;
        -ms-flex-direction: column-reverse;
        flex-direction: column-reverse;
    }
    .sidebar.pull-right {
        float: none !important;
        width: auto !important;
        margin: 0 0 16px 0;
    }
    .main-content {
        width: auto !important;
    }
    /* Formulários: empilhar no mobile */
    .login-box {
        width: 100% !important;
        box-shadow: none !important;
        -webkit-box-shadow: none !important;
        -moz-box-shadow: none !important;
        box-sizing: border-box;
    }
    .login-form-wrapper {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    .login-form-wrapper .instructions,
    .login-form-wrapper .login-side-info {
        padding-left: 15px;
        padding-top: 8px;
    }
}

@media (max-width: 480px) {
    #header #logo img {
        max-height: 45px;
    }
    .action-card {
        padding: 12px 14px;
    }
}
