﻿:root {
    --hdb-green: #4D6B3C;
    --hdb-green-dark: #2F4A2D;
    --hdb-green-soft: #718966;
    --hdb-gold: #C9A227;
    --hdb-cream: #F5F5F0;
    --hdb-brown: #6B5843;
    --hdb-text: #2E2E2E;
    --hdb-border: #DDD7C8;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--hdb-text);
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(rgba(47,74,45,.60), rgba(47,74,45,.60)), url('Images/Backgrounds/olival-login.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
    box-sizing: border-box;
}
.login-card {
    width: 100%;
    max-width: 470px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 34px;
    padding: 58px 54px;
    box-shadow: 0 25px 80px rgba(0,0,0,.35);
    box-sizing: border-box;
    animation: loginCardEnter .6s ease-out both;
}

.login-brand {
    text-align: center;
    margin-bottom: 22px;
}

.login-company-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 18px;
}

.login-app-title {
    font-size: 38px;
    line-height: 1;
    font-weight: 800;
    color: var(--hdb-green-dark);
    letter-spacing: -1px;
}

    .login-app-title span {
        color: #D8C9A3;
    }

    .login-app-title::after {
        content: "";
        display: block;
        width: 42px;
        height: 3px;
        background: var(--hdb-gold);
        border-radius: 99px;
        margin: 16px auto 12px;
    }

.login-app-subtitle {
    color: var(--hdb-brown);
    font-size: 15px;
    font-weight: 600;
}

.login-intro {
    margin: 0 0 26px;
    color: #6F675E;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.form-group {
    margin-bottom: 19px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 700;
        color: var(--hdb-green-dark);
    }

.input-hdb {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--hdb-border);
    border-radius: 15px;
    padding: 15px 16px;
    font-size: 15px;
    background: rgba(255,255,255,.86);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

    .input-hdb:focus {
        border-color: var(--hdb-green);
        background: #FFFFFF;
        box-shadow: 0 0 0 4px rgba(201,162,39,.16), 0 0 0 7px rgba(77,107,60,.08);
    }

.btn-hdb {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 18px;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--hdb-green), var(--hdb-green-dark));
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
    box-shadow: 0 12px 26px rgba(47,74,45,.25);
}

    .btn-hdb:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 34px rgba(47,74,45,.32);
    }

    .btn-hdb:active {
        transform: translateY(0);
    }

.login-footer {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(107,88,67,.14);
    text-align: center;
    font-size: 12px;
    color: #7A7469;
}

.login-message {
    display: block;
    margin-bottom: 16px;
    color: #9B2C2C;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

@media (max-width: 520px) {
    .login-page {
        padding: 20px;
    }

    .login-card {
        padding: 30px 24px;
        border-radius: 24px;
    }

    .login-company-logo {
        max-width: 128px;
    }

    .login-app-title {
        font-size: 34px;
    }
}


.app-shell {
    min-height: 100vh;
    display: flex;
    background: #F7F5EF;
}

.sidebar {
    position: relative;
    flex-shrink: 0;
    width: 250px;
    background: linear-gradient(180deg, #2F4A2D, #3F6137);
    color: white;
    padding: 32px 24px;
    box-sizing: border-box;
}

    .sidebar::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient( 180deg, #B98A12 0%, #F1D66C 30%, var(--hdb-gold) 55%, #E8C54E 75%, #A9780C 100% );
        box-shadow: 1px 0 4px rgba(201,162,39,.22);
        pointer-events: none;
        z-index: 2;
    }


.sidebar-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 36px;
}

.sidebar nav a {
    display: block;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    padding: 13px 16px;
    border-radius: 14px;
    margin-bottom: 8px;
    font-weight: 600;
}

    .sidebar nav a.active,
    .sidebar nav a:hover {
        background: rgba(255,255,255,.14);
        color: white;
    }

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 42px 42px 0 42px;
    box-sizing: border-box;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 34px;
    width: 100%;
}

    .topbar h1 {
        margin: 0;
        color: #2F4A2D;
        font-size: 30px;
    }

    .topbar p {
        margin: 8px 0 0;
        color: #7A7469;
    }

.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    min-height: 42px;
    background: #fff;
    border: 1px solid #dbcdb5; /* rebordo mais visível */
    border-radius: 999px;
    color: #173824;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0,0,0,.03);
    cursor: pointer;
    transition: .2s;
}

    .user-pill:hover {
        background: #faf8f4;
        border-color: #ccb891;
    }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 14px 34px rgba(47,74,45,.08);
}

    .stat-card span {
        color: #6B5843;
        font-weight: 700;
    }

    .stat-card strong {
        display: block;
        font-size: 30px;
        margin: 14px 0 8px;
        color: #2F4A2D;
    }

    .stat-card small {
        color: #8A8377;
    }

.panel {
    background: white;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 14px 34px rgba(47,74,45,.08);
}

    .panel h2 {
        margin-top: 0;
        color: #2F4A2D;
    }

.table-hdb {
    width: 100%;
    border-collapse: collapse;
}

    .table-hdb th,
    .table-hdb td {
        padding: 14px;
        border-bottom: 1px solid #EEE8DC;
        text-align: left;
    }

    .table-hdb th {
        color: #6B5843;
        font-size: 13px;
    }

.badge-ok {
    background: #DDEBD6;
    color: #2F4A2D;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}



.sidebar-brand {
    margin-bottom: 34px;
}

.sidebar-logo-box {
    background: rgba(255,255,255,.92);
    border-radius: 22px;
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

.sidebar-logo {
    width: 130px;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.sidebar-title span {
    color: #D8C9A3;
}


.filters-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    align-items: end;
    box-shadow: 0 14px 34px rgba(47,74,45,.08);
}

    .filters-card label {
        display: block;
        margin-bottom: 8px;
        color: #2F4A2D;
        font-weight: 700;
        font-size: 13px;
    }

.btn-filter {
    border: none;
    border-radius: 15px;
    padding: 15px;
    background: #4D6B3C;
    color: white;
    font-weight: 800;
    cursor: pointer;
}


@keyframes loginCardEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.table-link {
    color: #2F4A2D;
    font-weight: 800;
    text-decoration: none;
}

    .table-link:hover {
        color: #C9A227;
        text-decoration: underline;
    }


.badge-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #E7F0E2;
    color: var(--hdb-green-dark);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all .20s ease;
}

    .badge-link:hover {
        background: var(--hdb-green);
        color: #FFF;
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(47,74,45,.18);
    }


.detail-header {
    background: white;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 14px 34px rgba(47,74,45,.08);
}

    .detail-header h2 {
        margin: 12px 0 6px;
        color: #2F4A2D;
        font-size: 28px;
    }

    .detail-header p {
        margin: 0;
        color: #7A7469;
    }

.back-link {
    color: #4D6B3C;
    font-weight: 800;
    text-decoration: none;
}

    .back-link:hover {
        color: #C9A227;
    }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.detail-card {
    background: white;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 14px 34px rgba(47,74,45,.08);
}

    .detail-card span {
        color: #6B5843;
        font-weight: 700;
        font-size: 13px;
    }

    .detail-card strong {
        display: block;
        margin-top: 12px;
        color: #2F4A2D;
        font-size: 24px;
    }

.detail-notes {
    color: #6F675E;
    line-height: 1.7;
    margin-bottom: 0;
}

.password-info {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #f8f6ef;
    border-left: 4px solid #567a3c;
    color: #4f4f4f;
    font-size: 14px;
    line-height: 1.5;
}

    .password-info strong {
        color: #234127;
    }


.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    cursor: pointer;
    border: none;
}

.user-arrow {
    font-size: 10px;
    margin-left: 2px;
    color: #6c7b68;
}

.user-menu:hover .user-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 230px;
    background: #ffffff;
    border: 1px solid #e8ded0;
    border-radius: 16px;
    box-shadow: 0 14px 35px rgba(35, 65, 39, 0.14);
    padding: 8px;
    z-index: 9999;
}

    .user-menu:hover .user-dropdown,
    .user-dropdown:hover {
        display: block;
    }

    .user-dropdown a {
        display: block;
        padding: 14px 16px;
        color: #143b22;
        font-weight: 700;
        text-decoration: none;
        border-radius: 12px;
        white-space: nowrap;
    }

        .user-dropdown a:hover {
            background: #eef3e9;
        }


.hdb-footer {
    margin-top: auto;
    padding: 40px 0 20px;
    text-align: center;
    color: #8b8175;
    font-size: 14px;
}

.admin-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7f5ef;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    padding: 34px 42px;
    background: #ffffff;
    border-bottom: 1px solid #e8e2d6;
}

    .admin-topbar h1 {
        margin: 0;
        color: #2f4a2d;
        font-size: 30px;
    }

    .admin-topbar p {
        margin: 8px 0 0;
        color: #7a7469;
    }

.admin-user-box {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-user-name {
    padding: 9px 18px;
    border: 1px solid #dbcdb5;
    border-radius: 999px;
    background: #ffffff;
    color: #173824;
    font-size: 16px;
    font-weight: 700;
}

.admin-logout-link {
    color: #4d6b3c;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

    .admin-logout-link:hover {
        color: #c9a227;
    }

.admin-content {
    flex: 1;
    padding: 42px;
    box-sizing: border-box;
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
    margin-bottom: 24px;
}

    .admin-panel-header h2 {
        margin-bottom: 6px;
    }

    .admin-panel-header p {
        margin: 0;
        color: #7a7469;
    }

.admin-search-box {
    display: grid;
    grid-template-columns: minmax(240px, 340px) 130px;
    gap: 12px;
    align-items: end;
}

    .admin-search-box label {
        grid-column: 1 / -1;
        color: #2f4a2d;
        font-size: 13px;
        font-weight: 700;
    }

    .admin-search-box .input-hdb,
    .admin-search-box .btn-filter {
        width: 100%;
    }

.admin-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 999px;
    background: #eef3e9;
    color: #2f4a2d;
    font-size: 14px;
}

    .admin-summary strong {
        font-size: 16px;
    }

.admin-action-column {
    width: 130px;
    text-align: center !important;
}

.admin-access-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #4d6b3c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all .18s ease;
}

    .admin-access-link:hover {
        background: #2f4a2d;
        color: #ffffff;
        transform: translateY(-1px);
        box-shadow: 0 7px 16px rgba(47, 74, 45, .18);
    }

.admin-status-active {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ddebd6;
    color: #2f4a2d;
    font-size: 12px;
    font-weight: 800;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

@media (max-width: 900px) {

    .admin-topbar,
    .admin-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-box {
        justify-content: space-between;
    }

    .admin-search-box {
        width: 100%;
        grid-template-columns: 1fr;
    }

        .admin-search-box label {
            grid-column: auto;
        }

    .admin-content {
        padding: 24px;
    }
}

.admin-context-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: #fff7d6;
    border: 1px solid #d8c47f;
    border-left: 5px solid #c9a227;
    border-radius: 14px;
    color: #584819;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(107, 88, 67, .08);
}

.admin-context-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-context-icon {
    font-size: 17px;
}

.admin-context-bar strong {
    color: #2f4a2d;
}

.admin-context-exit {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: #4d6b3c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

    .admin-context-exit:hover {
        background: #2f4a2d;
        color: #ffffff;
    }


/* =========================================
   PÁGINA ADMINISTRATIVA — CLIENTES PORTAL
   ========================================= */

.admin-page {
    background: #f7f5ef;
}

/* Cabeçalho verde, alinhado com o portal */
.admin-topbar {
    background: linear-gradient( 135deg, var(--hdb-green-dark), var(--hdb-green) );
    border-bottom: 4px solid var(--hdb-gold);
    padding: 32px 42px;
}

    .admin-topbar h1 {
        color: #ffffff;
    }

    .admin-topbar p {
        color: rgba(255, 255, 255, .78);
    }

    /* Nome do administrador */
    .admin-topbar .user-pill {
        background: #ffffff;
        color: var(--hdb-green-dark);
        border-color: rgba(255, 255, 255, .75);
        box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
    }

/* Painel principal */
.admin-page .panel {
    border-top: 5px solid var(--hdb-green);
}

/* Título da listagem */
.admin-panel-header h2 {
    color: var(--hdb-green-dark);
}

/* Cabeçalho da tabela */
.admin-page .table-hdb thead {
    background: #f1f6ed;
}

.admin-page .table-hdb th {
    color: var(--hdb-green-dark);
}

/* Linhas da tabela */
.admin-page .table-hdb tbody tr {
    transition: background .18s ease;
}

    .admin-page .table-hdb tbody tr:hover {
        background: #f7faf5;
    }

/* Contador de clientes */
.admin-summary {
    background: #e6f0df;
    border: 1px solid #d3e3ca;
    color: var(--hdb-green-dark);
}

/* Botão pesquisar e aceder */
.admin-page .btn-filter,
.admin-page .admin-access-link {
    background: var(--hdb-green);
}

    .admin-page .btn-filter:hover,
    .admin-page .admin-access-link:hover {
        background: var(--hdb-green-dark);
    }

/* Estado ativo */
.admin-page .admin-status-active {
    background: #dcebd5;
    color: var(--hdb-green-dark);
}

.detail-ticket {
    display: block;
    margin-top: 10px;
    font-size: .90rem;
    color: #8b7c63;
}

.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.btn-export-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 11px;
    background: linear-gradient( 135deg, var(--hdb-green), var(--hdb-green-dark) );
    border: 1px solid rgba(47, 74, 45, .18);
    border-radius: 999px;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 3px 8px rgba(47, 74, 45, .14);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .btn-export-pdf i {
        font-size: 10px;
        color: #ffffff;
    }

    .btn-export-pdf:hover {
        color: #ffffff !important;
        text-decoration: none !important;
        transform: translateY(-1px);
        box-shadow: 0 5px 11px rgba(47, 74, 45, .20);
    }
  

@media (max-width: 700px) {
    .detail-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

.detail-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-export-pdf {
    margin-left: 30px !important;
}