@font-face {
    font-family: 'PP Hatton';
    src: url('fonts/PPHatton-Ultralight.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Hatton';
    src: url('fonts/PPHatton-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PP Hatton';
    src: url('fonts/PPHatton-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #181A10;
    --bg-2: #21231A;
    --bg-card: rgba(28, 30, 18, 0.92);
    --bg-card-hover: rgba(36, 38, 24, 0.98);

    --gold-1: #8F6538;
    --gold-2: #9F7F44;
    --gold-3: #C3C26E;
    --gold-4: #E2EAA2;
    --gold-text: #D6C181;

    --cream: #F3EDDF;
    --cream-muted: rgba(243, 237, 223, 0.55);
    --olive: #656950;
    --olive-dark: #3F4230;

    --border-gold: rgba(195, 194, 110, 0.18);
    --border-gold-hover: rgba(195, 194, 110, 0.45);

    --color-vendas: #D4A843;
    --color-os: #7EB8D9;
    --color-ticket: #90C976;
    --color-meta: #6BAEAD;
    --color-mes: #B68DD9;
    --color-red: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 5% 5%, rgba(143, 101, 56, 0.09) 0%, transparent 45%),
        radial-gradient(ellipse at 95% 95%, rgba(101, 105, 80, 0.11) 0%, transparent 45%);
    color: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background ornaments */
.bg-ornament {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
}

.ornament-1 {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(143, 101, 56, 0.13) 0%, transparent 70%);
    top: -120px; left: -160px;
    animation: driftSlow 28s infinite alternate ease-in-out;
}

.ornament-2 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(101, 105, 80, 0.11) 0%, transparent 70%);
    bottom: -100px; right: -120px;
    animation: driftSlow 32s infinite alternate-reverse ease-in-out;
}

.ornament-3 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(195, 194, 110, 0.07) 0%, transparent 70%);
    top: 48%; left: 44%;
    animation: driftSlow 22s infinite alternate ease-in-out;
    animation-delay: -9s;
}

@keyframes driftSlow {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(45px, 35px); }
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 52px 42px;
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 48px;
    gap: 16px;
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.brand-logo-img {
    height: 140px;
    width: auto;
    filter: drop-shadow(0 0 12px rgba(195, 194, 110, 0.25));
    transition: filter 0.3s ease;
}

.brand-logo-img:hover {
    filter: drop-shadow(0 0 22px rgba(195, 194, 110, 0.5));
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page-title {
    font-family: 'PP Hatton', serif;
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(130deg, #8F6538 0%, #C3C26E 50%, #E2EAA2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(24, 26, 16, 0.85);
    padding: 14px 24px;
    border-radius: 32px;
    border: 1px solid var(--border-gold);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.status-label {
    font-size: 0.7rem;
    color: var(--gold-text);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 3px;
}

.status-time {
    font-size: 0.88rem;
    color: var(--cream-muted);
}

.status-time strong {
    color: var(--cream);
    font-weight: 500;
}

/* Pulse dots */
.pulse-dot {
    width: 10px; height: 10px;
    background-color: var(--color-meta);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulseBlue 2s infinite;
}

.pulse-dot-gold {
    background-color: var(--gold-3);
    animation: pulseGold 2s infinite;
}

@keyframes pulseBlue {
    0%   { box-shadow: 0 0 0 0 rgba(107, 174, 173, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(107, 174, 173, 0); }
    100% { box-shadow: 0 0 0 0 rgba(107, 174, 173, 0); }
}

@keyframes pulseGold {
    0%   { box-shadow: 0 0 0 0 rgba(195, 194, 110, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(195, 194, 110, 0); }
    100% { box-shadow: 0 0 0 0 rgba(195, 194, 110, 0); }
}

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 52px;
    opacity: 0.45;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-3), transparent);
}

.divider-ornament {
    font-size: 0.85rem;
    color: var(--gold-3);
    flex-shrink: 0;
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 42px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: 20px;
    padding: 38px 34px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-glow {
    position: absolute;
    top: -30px; right: -30px;
    width: 140px; height: 140px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    filter: blur(36px);
    pointer-events: none;
}

.card-vendas-hoje .card-glow { background: var(--color-vendas); }
.card-qtd-os     .card-glow { background: var(--color-os); }
.card-ticket-hoje .card-glow { background: var(--color-ticket); }
.card-mes-total  .card-glow { background: var(--color-mes); }
.card-meta-diaria .card-glow, .card-meta-mensal .card-glow { background: var(--color-meta); }

.card:hover {
    transform: translateY(-12px);
    border-color: var(--border-gold-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
}

.card:hover .card-glow { opacity: 0.1; }

.card-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 26px;
    border: 1px solid;
    transition: transform 0.3s ease;
}

.card:hover .card-icon { transform: scale(1.05) rotate(-3deg); }
.card-icon svg { width: 26px; height: 26px; }

.card-vendas-hoje .card-icon { background: rgba(212, 168, 67, 0.10); color: var(--color-vendas); border-color: rgba(212, 168, 67, 0.25); }
.card-qtd-os      .card-icon { background: rgba(126, 184, 217, 0.10); color: var(--color-os);    border-color: rgba(126, 184, 217, 0.25); }
.card-ticket-hoje .card-icon { background: rgba(144, 201, 118, 0.10); color: var(--color-ticket); border-color: rgba(144, 201, 118, 0.25); }
.card-mes-total   .card-icon { background: rgba(182, 141, 217, 0.10); color: var(--color-mes);   border-color: rgba(182, 141, 217, 0.25); }
.card-meta-diaria .card-icon, .card-meta-mensal .card-icon { background: rgba(107, 174, 173, 0.10); color: var(--color-meta);  border-color: rgba(107, 174, 173, 0.25); }

.card h3 {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--cream-muted);
    margin-bottom: 12px;
}

.number {
    font-family: 'PP Hatton', serif;
    font-size: 3.2rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.card-vendas-hoje .number { color: var(--color-vendas); text-shadow: 0 0 22px rgba(212, 168, 67, 0.3); }
.card-qtd-os      .number { color: var(--color-os);     text-shadow: 0 0 22px rgba(126, 184, 217, 0.3); }
.card-ticket-hoje .number { color: var(--color-ticket);  text-shadow: 0 0 22px rgba(144, 201, 118, 0.3); }
.card-mes-total   .number { color: var(--color-mes);    text-shadow: 0 0 22px rgba(182, 141, 217, 0.3); }
.card-meta-diaria .number, .card-meta-mensal .number { color: var(--color-meta);   text-shadow: 0 0 22px rgba(107, 174, 173, 0.3); }

.card p {
    font-size: 0.88rem;
    color: var(--cream-muted);
    line-height: 1.4;
    font-weight: 300;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    max-width: 260px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-1), var(--gold-3));
    border-radius: 4px;
    transition: width 1s ease-out;
}

.progress.complete {
    background: linear-gradient(90deg, var(--color-ticket), #34d399);
}

/* ===== CALENDAR + META SECTION ===== */
.calendar-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 42px;
}

.calendar-section {
    padding: 42px;
}

.meta-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.meta-stack .card {
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-gold);
}

.section-header h2 {
    font-family: 'PP Hatton', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--cream);
    letter-spacing: 0.03em;
}

/* Calendar Grid */
.calendar-wrapper {
    max-width: 460px;
    margin: 0 auto;
    padding: 10px 0;
}

.calendar-header-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    color: var(--gold-text);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-gold);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px 6px;
    margin-bottom: 24px;
}

.cal-day {
    width: 44px;
    height: 44px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: 'PP Hatton', serif;
    font-weight: 500;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    cursor: default;
    box-sizing: border-box;
}

.cal-day.empty {
    background: transparent;
}

.cal-day.blue {
    background: rgba(126, 184, 217, 0.12);
    color: var(--color-os);
    border: 1px solid rgba(126, 184, 217, 0.25);
}

.cal-day.red {
    background: rgba(239, 68, 68, 0.12);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.cal-day.today {
    border: 2px solid var(--gold-3) !important;
    box-shadow: 0 0 14px rgba(195, 194, 110, 0.35);
    background: rgba(212, 168, 67, 0.1);
    color: var(--gold-3);
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--cream-muted);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.legend-dot.blue { background-color: var(--color-os); }
.legend-dot.red  { background-color: var(--color-red); }

/* ===== CHART SECTION ===== */
.chart-section {
    padding: 42px;
    margin-bottom: 42px;
}

.chart-container {
    height: 350px;
    position: relative;
    width: 100%;
}

.bottom-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 42px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .container { padding: 28px 20px; }
    .brand-logo-img { height: 80px; }
    .page-title { font-size: 1.3rem; letter-spacing: 0.18em; }
    .calendar-meta-grid { grid-template-columns: 1fr; }
    .bottom-charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .container { padding: 20px 16px; }
    header {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
        margin-bottom: 28px;
    }
    .header-logo { grid-column: 1; grid-row: 1; }
    .header-right { grid-column: 2; grid-row: 1; justify-content: flex-end; }
    .header-center { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
    .brand-logo-img { height: 70px; }
    .page-title { font-size: 1.15rem; letter-spacing: 0.16em; }
    .status-indicator { padding: 10px 14px; gap: 10px; }
    .status-label { font-size: 0.62rem; }
    .status-time { font-size: 0.78rem; }
    .pulse-dot { width: 8px; height: 8px; }
    .divider { margin-bottom: 24px; }
    .dashboard-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 24px; }
    .calendar-meta-grid { grid-template-columns: 1fr; gap: 12px; }
    .card { padding: 24px 20px; border-radius: 14px; }
    .number { font-size: 2.8rem; white-space: normal; }
    .chart-section { padding: 20px 14px; }
    .chart-container { height: 280px; }
    .calendar-section { padding: 24px 14px; }
    .cal-day { font-size: 0.95rem; }
}

@media (max-width: 480px) {
    .container { padding: 16px 14px; }
    header {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
    }
    .brand-logo-img { height: 50px; }
    .page-title { font-size: 0.95rem; letter-spacing: 0.12em; }
    .status-indicator { padding: 6px 10px; gap: 6px; border-radius: 16px; transform: scale(0.9); transform-origin: right center; }
    .status-label { display: none; }
    .status-time { font-size: 0.65rem; }
    .number { font-size: 2.4rem; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dashboard-grid, .calendar-meta-grid, .chart-section {
    animation: fadeInUp 0.7s ease backwards;
}
.calendar-meta-grid { animation-delay: 0.1s; }
.chart-section { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .ornament-1, .ornament-2, .ornament-3 { animation: none; }
    .pulse-dot, .pulse-dot-gold { animation: none; }
    .card { transition: none; }
    .dashboard-grid, .calendar-meta-grid, .chart-section { animation: none; }
}
