@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
    --ink: #102a43;
    --muted: #486581;
    --paper: #f9fcff;
    --panel: #ffffff;
    --line: #d9e2ec;
    --brand: #007f5f;
    --brand-dark: #046c4e;
    --accent: #ff7d00;
    --danger: #b00020;
    --danger-soft: #ffe3ea;
    --info: #145da0;
    --info-soft: #deedff;
    --success: #166534;
    --success-soft: #ddf8e4;
    --shadow: 0 16px 35px rgba(16, 42, 67, 0.12);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 8% 10%, rgba(0, 127, 95, 0.14), transparent 40%),
        radial-gradient(circle at 90% 20%, rgba(255, 125, 0, 0.12), transparent 35%),
        linear-gradient(180deg, #f7fbff 0%, #f3f8fc 100%);
    color: var(--ink);
    font-family: 'Source Sans 3', Tahoma, sans-serif;
    position: relative;
}

.bg-shape {
    position: fixed;
    z-index: -1;
    filter: blur(20px);
    pointer-events: none;
}

.shape-a {
    width: 260px;
    height: 260px;
    border-radius: 70% 30% 60% 40%;
    background: rgba(0, 127, 95, 0.2);
    top: -70px;
    left: -70px;
}

.shape-b {
    width: 300px;
    height: 300px;
    border-radius: 54% 46% 43% 57%;
    background: rgba(255, 125, 0, 0.17);
    bottom: -80px;
    right: -60px;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(247, 251, 255, 0.85);
    border-bottom: 1px solid rgba(15, 49, 76, 0.08);
}

.header-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(140deg, var(--brand), #00a878);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.brand strong {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
}

.brand small {
    color: var(--muted);
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    padding: 10px 12px;
    border-radius: 10px;
}

.nav-link:hover {
    background: rgba(16, 42, 67, 0.08);
}

.nav-action {
    background: linear-gradient(135deg, var(--brand), #00a878);
    color: #fff;
}

.nav-action:hover {
    background: linear-gradient(135deg, var(--brand-dark), #008f65);
}

.main-content {
    flex: 1 0 auto;
    padding: 28px 0 56px;
}

.main-content > * {
    animation: rise 0.5s ease both;
}

.main-content > *:nth-child(2) {
    animation-delay: 0.07s;
}

.main-content > *:nth-child(3) {
    animation-delay: 0.14s;
}

.hero {
    background: linear-gradient(130deg, #102a43, #0a7b5d);
    border-radius: calc(var(--radius) + 6px);
    color: #fff;
    padding: clamp(22px, 4vw, 44px);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.kicker {
    margin: 0 0 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.9;
}

.hero h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.hero p {
    margin: 0;
    max-width: 62ch;
}

.hero-cta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    text-decoration: none;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(140deg, var(--brand), #00a878);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(140deg, var(--brand-dark), #008c63);
}

.btn-secondary {
    background: #ffffff;
    color: #0f2f4d;
}

.btn-secondary:hover {
    background: #e9f5ff;
}

.section-head h1,
.section-head h2 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.stats-grid {
    margin: 18px 0 22px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 10px 24px rgba(16, 42, 67, 0.06);
}

.stat-card h2 {
    margin: 0;
    font-size: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--brand-dark);
}

.stat-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(16, 42, 67, 0.07);
    padding: 18px;
    margin-bottom: 20px;
}

.filter-form {
    display: grid;
    gap: 10px;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    margin: 16px 0;
}

.form-grid {
    display: grid;
    gap: 10px;
}

label {
    font-weight: 700;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #bcccdc;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 127, 95, 0.15);
    outline: none;
}

.ticket-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ticket-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 15px;
}

.solved-card {
    border-left: 5px solid #17a34a;
}

.detail-card {
    margin-bottom: 16px;
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ticket-card h3 {
    margin: 0 0 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.ticket-card p {
    margin-top: 0;
}

.card-link {
    color: var(--info);
    font-weight: 700;
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.84rem;
    font-weight: 700;
}

.status-aberto {
    background: #e6f0ff;
    color: #1f4b99;
}

.status-em-andamento {
    background: #fff2e5;
    color: #a45100;
}

.status-solucionado {
    background: #ddf8e4;
    color: #1d6b35;
}

.status-fechado {
    background: #eceff4;
    color: #3f4d5a;
}

.table-wrapper {
    overflow-x: auto;
}

.ticket-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.ticket-table th,
.ticket-table td {
    border-bottom: 1px solid #d9e2ec;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.ticket-table thead th {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-shell {
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.auth-card p {
    margin-top: 0;
}

.muted {
    color: var(--muted);
    font-size: 0.95rem;
}

.alert {
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-success {
    color: var(--success);
    border-color: #8ed5a5;
    background: var(--success-soft);
}

.alert-error {
    color: var(--danger);
    border-color: #ff9bb2;
    background: var(--danger-soft);
}

.alert-info {
    color: var(--info);
    border-color: #96beee;
    background: var(--info-soft);
}

.error-list {
    margin: 0;
    padding-left: 18px;
}

.meta-list {
    margin: 0;
    padding-left: 18px;
    color: #334e68;
    display: grid;
    gap: 6px;
}

.attachments-list,
.history-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.attachments-list li,
.history-list li {
    display: grid;
    gap: 4px;
}

.empty-state {
    color: #627d98;
    margin: 0;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(15, 49, 76, 0.1);
    background: rgba(255, 255, 255, 0.75);
}

.site-footer p {
    margin: 0;
    padding: 16px 0;
    color: #486581;
    text-align: center;
}

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

@media (max-width: 900px) {
    .filter-form {
        grid-template-columns: 1fr;
    }

    .header-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .hero {
        padding: 22px;
    }
}

@media (max-width: 560px) {
    .container {
        width: 94vw;
    }

    .nav-link {
        padding: 8px 10px;
    }

    .main-content {
        padding-top: 18px;
    }

    .panel,
    .auth-card,
    .hero {
        border-radius: 12px;
    }
}