/* ================================================
   ESTILOS DASHBOARD OCEA - ÁREA DO CLIENTE
   ================================================ */

:root {
    --primary-color: #007C8C;
    --secondary-color: #97BC62;
    --accent-color: #FFB81C;
    --neutral-bg: #F7F4EF;
    --text-dark: #2c2c2c;
    --brown-detail: #8B7355;
    --light-bg: #FAFAFA;
    --border-color: #E0E0E0;

    /* Altura real do header */
    --header-h: 88px;
    --top-gap: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: calc(var(--header-h) + var(--top-gap));
}

/* ================================================
   HEADER DASHBOARD
   ================================================ */
.header-dashboard,
.header {
    background: #007c8c !important;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-dashboard .logo img {
    height: 29px;
    width: auto;
    max-width: 195px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.btn-logout {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: var(--primary-color);
}

/* ================================================
   DASHBOARD CONTAINER
   ================================================ */
.dashboard-container {
    padding: 0.5rem 0;
    min-height: calc(100vh - 80px);
}

/* ================================================
   SIDEBAR MENU
   ================================================ */
.sidebar-menu {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: calc(var(--header-h) + var(--top-gap) + 0.5rem);
}

.user-info-sidebar {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--neutral-bg);
    border-radius: 50%;
    color: var(--primary-color);
}

.user-avatar-placeholder i {
    font-size: 3rem;
}

.user-info-sidebar h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.sidebar-link i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.sidebar-link:hover {
    background: var(--neutral-bg);
    color: var(--primary-color);
}

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

.sidebar-link.active i {
    color: white;
}

/* ================================================
   PAGE HEADER
   ================================================ */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* ================================================
   DASHBOARD CARDS
   ================================================ */
.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.dashboard-card .card-icon {
    width: 60px;
    height: 60px;
    background: var(--neutral-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.dashboard-card .card-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.dashboard-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.dashboard-card p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.dashboard-card .card-footer-link {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-card:hover .card-footer-link {
    gap: 0.75rem;
}

/* ================================================
   SECTION BOX
   ================================================ */
.section-box {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

/* ================================================
   DIAGNOSTIC SCORE
   ================================================ */
.diagnostic-score-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    color: white;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.score-circle .score-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.score-circle .score-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.score-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.score-info p {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.severity-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.severity-low {
    background: rgba(255, 255, 255, 0.3);
}

.severity-moderate {
    background: rgba(255, 184, 28, 0.3);
}

.severity-high {
    background: rgba(220, 53, 69, 0.3);
}

/* ================================================
   HEALTH MAP SVG
   ================================================ */
.health-map-container {
    padding: 1rem 0;
}

#health-map-svg-container {
    padding: 2rem;
}

#health-map-svg-container svg {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.health-categories-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--neutral-bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.category-item .category-name {
    font-weight: 600;
    color: var(--text-dark);
}

.category-item .category-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.category-item.category-low {
    border-left-color: #5CB85C;
}

.category-item.category-moderate {
    border-left-color: #F0AD4E;
}

.category-item.category-high {
    border-left-color: #D9534F;
}

/* ================================================
   HISTORY LIST
   ================================================ */
.history-item {
    background: var(--neutral-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.history-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.history-item-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.history-item-info p {
    margin-bottom: 0.25rem;
    color: #666;
    font-size: 0.9rem;
}

.history-item-action .btn-view {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item-action .btn-view:hover {
    background: var(--secondary-color);
}

/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 5rem;
    color: #ccc;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #999;
    margin-bottom: 2rem;
}

.btn-primary-action {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary-action:hover {
    background: var(--secondary-color);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 991px) {
    .sidebar-menu {
        position: static;
        margin-bottom: 2rem;
    }

    .diagnostic-score-container {
        flex-direction: column;
        text-align: center;
    }

    .health-map-container .row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 1rem;
    }

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

    .dashboard-card {
        padding: 1.5rem;
    }

    .section-box {
        padding: 1.5rem;
    }

    .history-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ================================================
   ANIMAÇÕES DO GRÁFICO OCEA
   ================================================ */
@keyframes sliceAnimate {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes logoAnimate {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slice-animate {
    animation: sliceAnimate 0.5s ease-out forwards;
    transform-origin: 400px 400px;
}

.logo-animate {
    animation: logoAnimate 0.8s ease-out 1s forwards;
    opacity: 0;
}

.glass {
    backdrop-filter: blur(10px);
}

/* ================================================
   CARD RITUAL OCEA
   ================================================ */

.card-score {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card-score:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Alinhamento do sidebar com header fixo */
@media (min-width: 992px) {
    .sidebar-menu {
        position: sticky;
        top: calc(var(--header-h) + var(--top-gap));
    }
}

/* Garante que a primeira section não suba sob o header */
#dashboard-main > .section-box:first-child {
    margin-top: 0 !important;
}

/* Ajustes de título */
.section-title {
    margin-top: 0;
}

/* Nome do usuário display */
.user-name-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Alinhamento perfeito do gauge + botão */
.box-score {
    --gauge-w: 220px;    /* largura visual dos dois */
    --gauge-gap: 12px;   /* espaço entre gauge e botão */
    gap: var(--gauge-gap);
}

/* Faz o SVG ocupar a largura definida e centraliza */
.box-score .gauge {
    width: var(--gauge-w);
    height: auto;
    display: block;
    margin-inline: auto;     /* centraliza */
    overflow: visible;       /* mantém arco sem corte */
}

/* Botão com a MESMA largura do gauge */
.box-score .btn-gauge {
    width: var(--gauge-w);
    max-width: none;         /* ignora max-width inline */
    display: block;
    margin-inline: auto;     /* centraliza */
}

/* Responsivo: em telas menores, deixa ocupar 100% até o limite */
@media (max-width: 480px) {
    .box-score {
        --gauge-w: min(220px, 85vw);
    }
}

/* Botão padrão da marca (turquesa arredondado) */
.btn-brand {
    background: #007c8c;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 140, 0.3);
}

.btn-brand:hover {
    background: #005f6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 124, 140, 0.4);
    color: white;
}

.btn-brand:active {
    transform: translateY(0);
}

.btn-account {
    background: #007c8c;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 140, 0.3);
}

.btn-account:hover {
    background: #005f6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 124, 140, 0.4);
    color: white;
}

.btn-account:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .card-score {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }
}

/* ================================================
   AVATAR E IMAGEM DO USUÁRIO
   ================================================ */
.avatar-dropzone {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.avatar-dropzone:hover {
    transform: scale(1.05);
}

.image-user {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-image {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
}

.line {
    color: #999;
    font-weight: 300;
}

.box-user-info {
    min-width: 300px;
}

@media (max-width: 768px) {
    .avatar-dropzone {
        width: 80px;
        height: 80px;
    }

    .box-user-info {
        min-width: auto;
    }
}
