/* ─── Gosh Live Marketing — App Styles v1.2 ─────────────────────────────────── */

/* ─── Brand Fonts ─────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'SnowflakeSans';
    src: url('fonts/SnowflakeSans-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'SnowflakeSans';
    src: url('fonts/SnowflakeSans-Book.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'SnowflakeSans';
    src: url('fonts/SnowflakeSans-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'SnowflakeSans';
    src: url('fonts/SnowflakeSans-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'SnowflakeSans';
    src: url('fonts/SnowflakeSans-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
}

:root {
    --gosh-primary:   #E55125;
    --gosh-secondary: #F36D2A;
    --gosh-dark:      #2B2622;
    --gosh-cream:     #F3EEE2;
    --gosh-beige:     #E1D8CD;
    --gosh-gold:      #FFD067;
    --gosh-green:     #88CCA2;
    --gosh-brown:     #766561;
    --sidebar-width:  250px;
    --font-brand:     'SnowflakeSans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body:      'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
body {
    background-color: var(--gosh-cream);
    font-family: var(--font-body);
    min-height: 100vh;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--gosh-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: center;
}
.sidebar-logo img {
    height: 36px;
    width: auto;
    margin-bottom: 4px;
}
.sidebar-logo .brand-name {
    display: block;
    font-family: var(--font-brand);
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--gosh-primary);
    line-height: 1;
}
.sidebar-logo .brand-tagline {
    display: block;
    font-family: var(--font-brand);
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1.5px;
    margin-top: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
}
.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border-left-color: rgba(255,255,255,0.2);
}
.sidebar-nav .nav-item.active {
    color: #fff;
    background: rgba(229, 81, 37, 0.15);
    border-left-color: var(--gosh-primary);
}
.sidebar-nav .nav-item i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}
.sidebar-nav .nav-section {
    padding: 18px 20px 6px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: rgba(255,255,255,0.25);
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.user-info i {
    font-size: 1.6rem;
    color: var(--gosh-brown);
}
.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}
.user-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.35);
}

/* ─── Main Content ─────────────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 28px 32px;
}

.page-header {
    margin-bottom: 24px;
}
.page-title {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gosh-dark);
    margin: 0;
}
.page-subtitle {
    color: var(--gosh-brown);
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(43, 38, 34, 0.08);
    background: #fff;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gosh-beige);
    font-weight: 600;
    padding: 14px 18px;
    font-family: var(--font-brand);
}

/* ─── Stats Cards ──────────────────────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(43, 38, 34, 0.08);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.primary   { background: rgba(229,81,37,0.12);  color: var(--gosh-primary); }
.stat-icon.success   { background: rgba(136,204,162,0.2); color: #2d8c5c; }
.stat-icon.warning   { background: rgba(255,208,103,0.25);color: #c49200; }
.stat-icon.info      { background: rgba(13,202,240,0.12); color: #0891b2; }

.stat-value {
    font-family: var(--font-brand);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gosh-dark);
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--gosh-brown);
    margin-top: 2px;
}

/* ─── Project Cards ────────────────────────────────────────────────────────── */
.project-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(43,38,34,0.08);
    border-left: 4px solid var(--gosh-beige);
    transition: box-shadow 0.15s, transform 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.project-card:hover {
    box-shadow: 0 4px 16px rgba(43,38,34,0.14);
    transform: translateY(-1px);
    color: inherit;
}
.project-card.status-briefing         { border-left-color: #adb5bd; }
.project-card.status-em_criacao       { border-left-color: #0dcaf0; }
.project-card.status-proposta_enviada { border-left-color: var(--gosh-gold); }
.project-card.status-aprovado         { border-left-color: #0d6efd; }
.project-card.status-em_producao      { border-left-color: var(--gosh-primary); }
.project-card.status-realizado        { border-left-color: var(--gosh-green); }
.project-card.status-cancelado        { border-left-color: #495057; }

.project-name {
    font-family: var(--font-brand);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gosh-dark);
    margin-bottom: 2px;
}
.project-client {
    font-size: 0.8rem;
    color: var(--gosh-brown);
}
.project-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.project-meta i {
    margin-right: 3px;
}

/* ─── Progress Bar ─────────────────────────────────────────────────────────── */
.progress {
    height: 6px;
    border-radius: 3px;
    background-color: var(--gosh-beige);
}
.progress-bar {
    border-radius: 3px;
    background-color: var(--gosh-primary);
    transition: width 0.4s ease;
}
.progress-bar.bg-success { background-color: var(--gosh-green) !important; }

/* ─── Checklist ────────────────────────────────────────────────────────────── */
.checklist-category {
    margin-bottom: 20px;
}
.checklist-category-title {
    font-family: var(--font-brand);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gosh-brown);
    padding: 8px 0 4px;
    border-bottom: 1px solid var(--gosh-beige);
    margin-bottom: 6px;
}
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 4px;
    border-radius: 6px;
    transition: background 0.1s;
    cursor: pointer;
}
.checklist-item:hover {
    background: var(--gosh-cream);
}
.checklist-item.completed .item-text {
    text-decoration: line-through;
    color: #aaa;
}
.checklist-item .form-check-input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    border-color: var(--gosh-beige);
}
.checklist-item .form-check-input:checked {
    background-color: var(--gosh-green);
    border-color: var(--gosh-green);
}
.item-text {
    font-size: 0.88rem;
    color: var(--gosh-dark);
    line-height: 1.4;
}
.item-completer {
    font-size: 0.7rem;
    color: #aaa;
    margin-top: 2px;
}

/* ─── Badges ───────────────────────────────────────────────────────────────── */
.badge.bg-gosh {
    background-color: var(--gosh-primary) !important;
    color: #fff;
}
.badge {
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn-gosh {
    background-color: var(--gosh-primary);
    border-color: var(--gosh-primary);
    color: #fff;
    font-weight: 600;
}
.btn-gosh:hover {
    background-color: #c94420;
    border-color: #c94420;
    color: #fff;
}
.btn-outline-gosh {
    border-color: var(--gosh-primary);
    color: var(--gosh-primary);
}
.btn-outline-gosh:hover {
    background-color: var(--gosh-primary);
    color: #fff;
}

/* ─── Pipeline Strip ───────────────────────────────────────────────────────── */
.pipeline-strip {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.pipeline-strip .btn {
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ─── Tabs ─────────────────────────────────────────────────────────────────── */
.nav-tabs {
    border-bottom: 2px solid var(--gosh-beige);
    gap: 4px;
}
.nav-tabs .nav-link {
    color: var(--gosh-brown);
    border: none;
    border-radius: 8px 8px 0 0;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 500;
}
.nav-tabs .nav-link:hover {
    color: var(--gosh-dark);
    background: var(--gosh-beige);
}
.nav-tabs .nav-link.active {
    color: var(--gosh-primary);
    background: transparent;
    border-bottom: 2px solid var(--gosh-primary);
    font-weight: 700;
}

/* ─── Task Cards ───────────────────────────────────────────────────────────── */
.task-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-left: 3px solid var(--gosh-beige);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.task-card.priority-alta   { border-left-color: #dc3545; }
.task-card.priority-media  { border-left-color: var(--gosh-gold); }
.task-card.priority-baixa  { border-left-color: var(--gosh-green); }
.task-card.status-concluida { opacity: 0.6; }
.task-card.overdue { background: #fff5f5; }

.task-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gosh-dark);
}
.task-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ─── Supplier Cards ───────────────────────────────────────────────────────── */
.supplier-card {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.supplier-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gosh-dark);
}
.supplier-meta {
    font-size: 0.75rem;
    color: #999;
}
.supplier-cost {
    font-weight: 700;
    color: var(--gosh-primary);
    font-size: 0.9rem;
}

/* ─── Status Badge Colors ──────────────────────────────────────────────────── */
.bg-gosh { background-color: var(--gosh-primary) !important; }

/* ─── Form Styles ──────────────────────────────────────────────────────────── */
.form-control:focus, .form-select:focus {
    border-color: var(--gosh-primary);
    box-shadow: 0 0 0 0.2rem rgba(229,81,37,0.15);
}
.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gosh-dark);
    margin-bottom: 4px;
}

/* ─── Alert Override ───────────────────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
}

/* ─── Login Page ───────────────────────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gosh-dark) 0%, #4a3a34 100%);
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 4px;
}
.login-logo img {
    height: 50px;
    width: auto;
}
.login-logo-text {
    font-family: var(--font-brand);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: var(--gosh-primary);
    text-align: center;
    margin-bottom: 4px;
}
.login-tagline {
    text-align: center;
    font-family: var(--font-brand);
    font-size: 0.72rem;
    color: var(--gosh-brown);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 28px;
    font-weight: 300;
}

/* ─── Delete Confirmation Modal ────────────────────────────────────────────── */
.modal-delete .modal-header {
    border-bottom: 1px solid var(--gosh-beige);
}
.modal-delete .modal-title {
    font-family: var(--font-brand);
    font-weight: 700;
    color: var(--gosh-dark);
}
.modal-delete .btn-danger {
    background-color: #dc3545;
    font-weight: 600;
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar-logo {
        padding: 12px 16px;
        border-bottom: none;
    }
    .sidebar-logo img { height: 28px; }
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0;
        gap: 0;
    }
    .sidebar-nav .nav-item {
        padding: 8px 14px;
        border-left: none;
        border-bottom: 3px solid transparent;
        font-size: 0.8rem;
    }
    .sidebar-nav .nav-item.active {
        border-left-color: transparent;
        border-bottom-color: var(--gosh-primary);
    }
    .sidebar-nav .nav-section { display: none; }
    .sidebar-footer { display: none; }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
}

/* ─── Basecamp-style Board (Criação & Planejamento) ───────────────────────── */
.bc-view-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.bc-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gosh-brown);
    background: #fff;
    border: 2px solid var(--gosh-beige);
    text-decoration: none;
    transition: all 0.15s;
}
.bc-view-btn:hover {
    color: var(--gosh-dark);
    border-color: var(--gosh-primary);
    background: #fff;
}
.bc-view-btn.active {
    color: #fff;
    background: var(--gosh-primary);
    border-color: var(--gosh-primary);
}
.bc-view-btn .bc-view-counts {
    font-size: 0.7rem;
    opacity: 0.7;
}

.bc-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid var(--gosh-beige);
}
.bc-group-title {
    font-family: var(--font-brand);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gosh-dark);
}
.bc-group-title a {
    color: var(--gosh-dark);
}
.bc-group-title a:hover {
    color: var(--gosh-primary);
}
.bc-group-client {
    font-size: 0.8rem;
    color: var(--gosh-brown);
    font-weight: 400;
    margin-left: 8px;
}
.bc-group-desc {
    font-size: 0.78rem;
    color: var(--gosh-brown);
    font-weight: 400;
    margin-left: 8px;
}
.bc-group-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--gosh-brown);
}

.bc-list {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 1px 4px rgba(43,38,34,0.08);
}
.bc-group .bc-list {
    border-radius: 0 0 10px 10px;
}
.bc-list:not(.bc-group .bc-list) {
    border-radius: 10px;
}

.bc-todo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background 0.1s;
}
.bc-todo:last-child {
    border-bottom: none;
}
.bc-todo:hover {
    background: var(--gosh-cream);
}
.bc-todo.bc-overdue {
    background: #fff5f5;
}
.bc-todo.bc-overdue:hover {
    background: #ffeded;
}

.bc-todo-check {
    flex-shrink: 0;
    padding-top: 1px;
}
.bc-check-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--gosh-beige);
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.15s;
}
.bc-check-btn:hover {
    color: var(--gosh-green);
}

.bc-todo-body {
    flex: 1;
    min-width: 0;
}
.bc-todo-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gosh-dark);
    line-height: 1.3;
}
.bc-todo-meta {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.bc-project-tag a {
    color: var(--gosh-brown);
    text-decoration: none;
}
.bc-project-tag a:hover {
    color: var(--gosh-primary);
    text-decoration: underline;
}

.bc-badge-subtipo {
    font-size: 0.65rem;
    padding: 2px 7px;
}

/* Cor roxa para Planejamento */
.badge.bg-purple {
    background-color: #8b5cf6 !important;
    color: #fff;
}

/* ─── Utilities ────────────────────────────────────────────────────────────── */
.text-gosh    { color: var(--gosh-primary) !important; }
.text-muted   { color: var(--gosh-brown) !important; }
.border-gosh  { border-color: var(--gosh-primary) !important; }
.font-brand   { font-family: var(--font-brand); }
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--gosh-brown);
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}
