/* ============================================================
   Verbera — style.css
   Design moderno, elegante, responsivo
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Variables
   ---------------------------------------------------------- */
:root {
    /* Cores primárias */
    --blue-50:  #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;

    /* Tons neutros */
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semânticas */
    --color-primary:        var(--blue-600);
    --color-primary-hover:  var(--blue-700);
    --color-primary-light:  var(--blue-50);
    --color-danger:         #ef4444;
    --color-danger-hover:   #dc2626;
    --color-success:        #22c55e;
    --color-warning:        #f59e0b;

    /* Texto */
    --text-primary:   var(--gray-900);
    --text-secondary: var(--gray-500);
    --text-muted:     var(--gray-400);

    /* Superfícies */
    --bg-body:    var(--gray-50);
    --bg-white:   #ffffff;
    --bg-sidebar: var(--gray-900);

    /* Bordas */
    --border:        var(--gray-200);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);

    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --content-max:   960px;

    /* Transições */
    --transition: 0.2s ease;
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }

ul, ol { list-style: none; }

img { max-width: 100%; display: block; }

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}

/* ----------------------------------------------------------
   3. Layout principal
   ---------------------------------------------------------- */
.has-sidebar .main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.no-sidebar .main-wrapper {
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 32px 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ----------------------------------------------------------
   4. Sidebar
   ---------------------------------------------------------- */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-logo {
    width: 38px; height: 38px;
    background: var(--color-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
}

.sidebar-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.sidebar-toggle-close {
    display: none;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 20px;
    cursor: pointer;
    margin-left: auto;
    padding: 4px;
    border-radius: 6px;
    transition: color var(--transition);
}
.sidebar-toggle-close:hover { color: #fff; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gray-500);
    padding: 12px 8px 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 2px;
}

.nav-link i { font-size: 18px; flex-shrink: 0; }

.nav-link:hover {
    background: rgba(255,255,255,.06);
    color: #fff;
}

.nav-link.active {
    background: var(--blue-600);
    color: #fff;
}

.nav-link-danger { color: var(--gray-500); }
.nav-link-danger:hover { background: rgba(239,68,68,.12); color: #f87171; }

.sidebar-footer {
    padding: 16px 16px 20px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 36px; height: 36px;
    background: var(--blue-600);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.sidebar-user-role {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 199;
    backdrop-filter: blur(2px);
}

/* ----------------------------------------------------------
   5. Topbar
   ---------------------------------------------------------- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background var(--transition);
}
.topbar-toggle:hover { background: var(--gray-100); }

.topbar-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ----------------------------------------------------------
   6. Botões
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); color: var(--gray-800); }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: var(--gray-200);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger:hover { background: var(--color-danger-hover); border-color: var(--color-danger-hover); color: #fff; }

.btn-danger-ghost {
    background: transparent;
    color: var(--color-danger);
    border-color: transparent;
}
.btn-danger-ghost:hover { background: #fef2f2; border-color: #fecaca; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn i.spin {
    animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------
   7. Formulários
   ---------------------------------------------------------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group-full { grid-column: 1 / -1; }

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

.required { color: var(--color-danger); }

.form-control {
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(96,165,250,.15);
}

.form-control::placeholder { color: var(--gray-400); }

textarea.form-control { resize: vertical; }
.textarea-large  { min-height: 280px; }
.textarea-medium { min-height: 120px; }

.input-icon {
    position: relative;
}

.input-icon > i:first-child {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 17px;
    pointer-events: none;
}

.input-icon .form-control { padding-left: 40px; }

.input-icon-right .form-control { padding-right: 40px; }

.input-toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 17px;
    padding: 2px;
    transition: color var(--transition);
}
.input-toggle-pass:hover { color: var(--gray-600); }

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.char-counter {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

/* ----------------------------------------------------------
   8. Cards de formulário / visualização
   ---------------------------------------------------------- */
.page-form, .page-view { max-width: 800px; margin: 0 auto; }

.form-card, .view-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
}

.form-card-header, .view-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.form-card-header h2, .view-card-header { font-size: 20px; font-weight: 700; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    transition: color var(--transition);
}
.back-link:hover { color: var(--color-primary); }

/* ----------------------------------------------------------
   9. Alertas / Flash
   ---------------------------------------------------------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }

.alert ul { padding-left: 4px; }
.alert ul li { line-height: 1.7; }

.alert-error  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success{ background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 500;
    transition: opacity .4s ease, transform .4s ease;
}

.flash-success { background: #ecfdf5; color: #15803d; border-bottom: 1px solid #bbf7d0; }
.flash-error   { background: #fef2f2; color: #b91c1c; border-bottom: 1px solid #fecaca; }

.flash i { font-size: 18px; }

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: .6;
    font-size: 18px;
}
.flash-close:hover { opacity: 1; }

/* ----------------------------------------------------------
   10. Dashboard
   ---------------------------------------------------------- */
.dashboard-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-greeting h2 { font-size: 22px; font-weight: 700; }
.dashboard-greeting p  { color: var(--text-secondary); font-size: 14px; margin-top: 2px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-card-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-card-blue   .stat-card-icon { background: var(--blue-50);  color: var(--blue-600); }
.stat-card-indigo .stat-card-icon { background: #eef2ff; color: #4338ca; }
.stat-card-sky    .stat-card-icon { background: #f0f9ff; color: #0284c7; }
.stat-card-slate  .stat-card-icon { background: var(--gray-100); color: var(--gray-600); }

.stat-card-value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-card-value-sm {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.stat-card-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ----------------------------------------------------------
   11. Section card
   ---------------------------------------------------------- */
.section-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.section-card-header h3 { font-size: 16px; font-weight: 600; }

.link-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
}

/* ----------------------------------------------------------
   12. Sermon list (dashboard)
   ---------------------------------------------------------- */
.sermon-list { display: flex; flex-direction: column; }

.sermon-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--transition);
}

.sermon-list-item:last-child { border-bottom: none; }
.sermon-list-item:hover { background: var(--gray-50); }

.sermon-list-icon {
    width: 36px; height: 36px;
    background: var(--blue-50);
    color: var(--blue-600);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sermon-list-body { flex: 1; min-width: 0; }

.sermon-list-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sermon-list-title:hover { color: var(--color-primary); }

.sermon-list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 3px;
}

.sermon-list-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.sermon-list-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.action-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 7px;
    color: var(--gray-400);
    font-size: 16px;
    transition: background var(--transition), color var(--transition);
}
.action-btn:hover { background: var(--gray-100); color: var(--color-primary); }

/* ----------------------------------------------------------
   13. Sermon grid (lista)
   ---------------------------------------------------------- */
.page-sermons { max-width: 1100px; }

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

.page-header h2 { font-size: 22px; font-weight: 700; }
.page-header p  { color: var(--text-secondary); font-size: 13px; }

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.search-bar .input-icon { flex: 1; min-width: 200px; }

.sermon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.sermon-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-sm);
}

.sermon-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.sermon-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 0;
}

.sermon-card-icon {
    width: 36px; height: 36px;
    background: var(--blue-50);
    color: var(--blue-600);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
}

.sermon-card-date { font-size: 12px; color: var(--text-muted); }

.sermon-card-body { padding: 14px 18px; flex: 1; }

.sermon-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 10px;
}

.sermon-card-title a { color: inherit; }
.sermon-card-title a:hover { color: var(--color-primary); }

.sermon-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.sermon-card-footer {
    padding: 12px 18px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top: 1px solid var(--gray-100);
}

.sermon-card-footer .btn-delete { margin-left: auto; }

/* ----------------------------------------------------------
   14. Tags / badges
   ---------------------------------------------------------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.tag-bible   { background: var(--blue-50);  color: var(--blue-700);  border: 1px solid var(--blue-100); }
.tag-theme   { background: #f5f3ff;         color: #5b21b6;          border: 1px solid #ede9fe; }
.tag-date    { background: #fff7ed;         color: #c2410c;          border: 1px solid #fed7aa; }
.tag-neutral { background: var(--gray-100); color: var(--gray-600);  border: 1px solid var(--gray-200); }

/* ----------------------------------------------------------
   15. View de sermão
   ---------------------------------------------------------- */
.view-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.view-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.view-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin-bottom: 28px;
}

.view-content {
    font-size: 15px;
    line-height: 1.85;
    color: var(--gray-700);
    white-space: pre-wrap;
    word-break: break-word;
}

.view-notes {
    margin-top: 32px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--border-radius-sm);
    padding: 20px;
}

.view-notes h4 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--gray-600);
}

.view-notes-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-600);
    white-space: pre-wrap;
}

.view-actions { display: flex; gap: 8px; }

/* ----------------------------------------------------------
   16. Paginação
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.page-btn:hover { background: var(--blue-50); color: var(--color-primary); border-color: var(--blue-200); }
.page-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ----------------------------------------------------------
   17. Estado vazio
   ---------------------------------------------------------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
}

.empty-state i {
    font-size: 48px;
    color: var(--gray-300);
}

.empty-state p { font-size: 15px; color: var(--text-secondary); }

/* ----------------------------------------------------------
   18. Modal
   ---------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(3px);
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    padding: 36px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(.94) translateY(10px); }
    to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.modal-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    margin: 0 auto 16px;
}

.modal-icon-danger { background: #fef2f2; color: var(--color-danger); }

.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.modal-text  { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* ----------------------------------------------------------
   19. Login
   ---------------------------------------------------------- */
.login-page { background: var(--bg-white); }

.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-brand-panel {
    background: var(--blue-900);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
}

.login-brand-content { position: relative; z-index: 1; }

.login-brand-icon {
    width: 64px; height: 64px;
    background: var(--blue-600);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    color: #fff;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(37,99,235,.4);
}

.login-brand-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.login-brand-tagline {
    font-size: 16px;
    color: var(--blue-200);
    line-height: 1.7;
    margin-bottom: 40px;
}

.login-brand-features { display: flex; flex-direction: column; gap: 14px; }

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--blue-200);
    font-size: 14px;
}

.login-feature i {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.login-brand-decoration {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,.25) 0%, transparent 70%);
    bottom: -100px; right: -100px;
    pointer-events: none;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    background: var(--bg-white);
}

.login-form-container { width: 100%; max-width: 400px; }

.login-form-header { margin-bottom: 32px; }
.login-form-header h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.login-form-header p  { font-size: 14px; color: var(--text-secondary); }

.login-register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ----------------------------------------------------------
   20. Animação de entrada nos cards
   ---------------------------------------------------------- */
.fade-in-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s ease, transform .4s ease;
}

.fade-in-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----------------------------------------------------------
   21. Responsivo
   ---------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile grande / tablet pequeno */
@media (max-width: 768px) {
    .has-sidebar .main-wrapper { margin-left: 0; }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-toggle-close { display: flex; }
    .sidebar-overlay.active { display: block; }

    .topbar { padding: 0 20px; }
    .topbar-toggle { display: flex; }

    .main-content { padding: 20px; }

    .login-split { grid-template-columns: 1fr; }
    .login-brand-panel { display: none; }
    .login-form-panel { padding: 40px 24px; }

    .form-row { grid-template-columns: 1fr; }

    .form-card, .view-card { padding: 24px; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .stat-card-value { font-size: 22px; }

    .dashboard-greeting { flex-direction: column; align-items: flex-start; }

    .sermon-grid { grid-template-columns: 1fr; }

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

    .search-bar { flex-direction: column; }
    .search-bar .input-icon { min-width: unset; }

    .btn-text { display: none; }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal { padding: 24px 20px; }
    .topbar-title { font-size: 15px; }
}
