/* assets/app.css — Pastoral Web */
/* Paleta extraída da logo Paróquia Mãe da Divina Providência */
:root {
    --primary:      #005064;   /* verde-petróleo escuro — cor principal da logo */
    --primary-dark: #003848;   /* tom mais escuro para hover/active */
    --primary-mid:  #006464;   /* variação verde-azulado */
    --primary-light:#dcf0f0;   /* fundo suave */
    --primary-pale: #f0fafa;   /* fundo muito suave */
    --accent:       #006478;   /* destaque azul-petróleo */
    --green:        #15803d;
    --green-light:  #dcfce7;
    --amber:        #b45309;
    --amber-light:  #fef3c7;
    --gray:         #64748b;
    --gray-light:   #f1f5f9;
    --gray-border:  #e2e8f0;
    --white:        #ffffff;
    --text:         #1a1a2e;
    --text-muted:   #94a3b8;
    --radius:       8px;
    --shadow:       0 1px 3px rgba(0,80,100,.08), 0 1px 2px rgba(0,80,100,.05);
    --shadow-md:    0 4px 6px rgba(0,80,100,.1), 0 2px 4px rgba(0,80,100,.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--primary-pale);
    line-height: 1.5;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-mid) 100%);
    color: var(--white);
    padding: 0 20px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 54px;
    max-width: 1400px;
    margin: 0 auto;
}

.header-logo { font-size: 26px; line-height: 1; }

.header-info .header-nome {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .3px;
}

.header-info .header-sub { font-size: 11px; opacity: .75; }

.header-nav {
    display: flex;
    gap: 2px;
    margin-left: auto;
    align-items: center;
}

.header-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: background .15s;
}

.header-nav a:hover,
.header-nav a.active {
    background: rgba(255,255,255,.18);
    color: var(--white);
}

.header-user {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,.2);
    font-size: 12px;
    opacity: .85;
}

.header-user a { color: rgba(255,255,255,.7); text-decoration: none; margin-left: 8px; }
.header-user a:hover { color: var(--white); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.page-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid #cde6e6;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

/* ── Dashboard grid ──────────────────────────────────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.dash-card {
    background: var(--white);
    border: 1px solid #cde6e6;
    border-top: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: box-shadow .15s;
}

.dash-card:hover { box-shadow: var(--shadow-md); }
.dash-card .icon  { font-size: 24px; margin-bottom: 6px; }
.dash-card .label { font-size: 11px; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.dash-card .value { font-size: 28px; font-weight: 800; color: var(--primary-dark); line-height: 1.2; }

/* ── Tabelas ─────────────────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }

.tbl th {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #9dd4d4;
    white-space: nowrap;
}

.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--gray-border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--primary-pale); }
.tbl-wrap { overflow-x: auto; }

/* ── Botões ──────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-border);
    background: var(--white);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s;
    white-space: nowrap;
}

.btn:hover { background: var(--primary-light); border-color: #9dd4d4; }

.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-success { background: var(--green); color: var(--white); border-color: var(--green); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-danger { color: #dc2626; border-color: #fca5a5; }
.btn-danger:hover { background: #fef2f2; }

/* ── Formulários ─────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #9dd4d4;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,80,100,.12);
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-fixa        { background: var(--primary-light); color: var(--primary-dark); }
.badge-recorrente  { background: #ede9fe; color: #6d28d9; }
.badge-extra       { background: var(--amber-light); color: var(--amber); }
.badge-extra-pontual { background: #fef3c7; color: #92400e; }
.badge-ativo       { background: var(--green-light); color: var(--green); }
.badge-inativo     { background: #fee2e2; color: #dc2626; }
.badge-publicado   { background: var(--green-light); color: var(--green); }
.badge-rascunho    { background: var(--amber-light); color: var(--amber); }

/* ── Flash ───────────────────────────────────────────────────────────────── */
.flash { padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; font-size: 13px; }
.flash-ok   { background: var(--green-light); color: var(--green); border: 1px solid #86efac; }
.flash-erro { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-mid) 100%);
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,56,72,.4);
}

.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .icon { font-size: 52px; }
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--primary-dark); margin-top: 8px; }
.login-logo p  { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* ── Responsivo ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .header-inner { height: auto; padding: 10px 0; flex-wrap: wrap; }
    .header-nav   { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .page-wrap    { padding: 14px 12px; }
    .dash-grid    { grid-template-columns: repeat(2, 1fr); }
}
