/* ==========================================================================
   DESIGN SYSTEM — Gestão de Células
   ========================================================================== */

/* Fontes carregadas via <link> com preconnect no header.php (evita @import
   duplicado e render-blocking). */

:root {
    /* Brand Colors */
    --primary-color: #004B83;
    --primary-light: #006bb8;
    --primary-dark: #00365d;
    --secondary-color: #E18800;
    --secondary-light: #ffaa2b;
    --secondary-dark: #c47600;

    /* Accent Colors (KPI Cards) */
    --accent-blue: #3b82f6;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --accent-violet: #8b5cf6;
    --accent-rose: #f43f5e;

    /* Light Theme (Default) */
    --bg-color: #f0f4f8;
    --bg-subtle: #e8edf2;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-soft: #94a3b8;
    --card-bg: rgba(255, 255, 255, 0.97);
    --card-border: rgba(226, 232, 240, 0.8);
    --sidebar-bg: #001e3c;
    --sidebar-hover: rgba(255, 255, 255, 0.07);
    --sidebar-active: rgba(255, 255, 255, 0.12);
    --navbar-bg: rgba(255, 255, 255, 0.88);
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --input-focus-bg: #fff;
    --table-border: rgba(0, 0, 0, 0.04);
    --table-hover: rgba(0, 75, 131, 0.04);
    --divider: rgba(0, 0, 0, 0.07);
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-soft: 0 4px 24px rgba(0,0,0,0.05), 0 1px 4px rgba(0,0,0,0.03);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);
    --shadow-sidebar: 6px 0 24px rgba(0,0,0,0.12);

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;
    --sidebar-width: 260px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-slow: 0.4s ease;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    --gradient-sidebar: linear-gradient(180deg, #001e3c 0%, #003060 60%, #004B83 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-amber: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-emerald: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-violet: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --secondary-color: #f59e0b;
    --secondary-light: #fbbf24;

    --bg-color: #0c1220;
    --bg-subtle: #111827;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --text-soft: #64748b;
    --card-bg: rgba(17, 24, 39, 0.85);
    --card-border: rgba(255, 255, 255, 0.07);
    --sidebar-bg: #060d18;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(59, 130, 246, 0.15);
    --navbar-bg: rgba(12, 18, 32, 0.82);
    --input-bg: #111827;
    --input-border: #1e293b;
    --input-focus-bg: #0f172a;
    --table-border: rgba(255, 255, 255, 0.05);
    --table-hover: rgba(255, 255, 255, 0.04);
    --divider: rgba(255, 255, 255, 0.07);
    --shadow-xs: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-soft: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.5);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04);
    --shadow-sidebar: 6px 0 30px rgba(0,0,0,0.5);
    --gradient-sidebar: linear-gradient(180deg, #060d18 0%, #0a1628 60%, #0d1f3c 100%);
    --table-hover: rgba(59, 130, 246, 0.06);
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-control[readonly] {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--input-border);
}

[data-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-color) !important;
}

/* ==========================================================================
   BASE
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    letter-spacing: 0.15px;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Scrollbar Customizada */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(150, 150, 150, 0.25); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: rgba(150, 150, 150, 0.45); }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
    0%   { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70%  { transform: scale(1);   box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

@keyframes rotate-slow {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float-particle {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 0.6; }
    100% { transform: translateY(-100px) scale(1.2); opacity: 0; }
}

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

@keyframes toast-in {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toast-out {
    from { transform: translateX(0);    opacity: 1; max-height: 100px; margin-bottom: 10px; }
    to   { transform: translateX(110%); opacity: 0; max-height: 0;     margin-bottom: 0;   }
}

@keyframes progress-shrink {
    from { width: 100%; }
    to   { width: 0%; }
}

.fade-in    { animation: fadeInUp  0.45s var(--transition-base) forwards; }
.fade-in-l  { animation: fadeInLeft 0.45s var(--transition-base) forwards; }
.scale-in   { animation: scaleIn  0.35s var(--transition-bounce) forwards; }

/* Staggered delays */
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

/* ==========================================================================
   LAYOUT — WRAPPER & SIDEBAR
   ========================================================================== */

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

/* --- Sidebar --- */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    color: #fff;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    box-shadow: var(--shadow-sidebar);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
}

[data-theme="dark"] #sidebar {
    background: var(--gradient-sidebar);
}

/* Sidebar Header / Logo */
.sidebar-header {
    padding: 28px 20px 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-logo-icon {
    width: 72px;
    height: 72px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.sidebar-logo-title {
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.3;
}

.sidebar-logo-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.5px;
    font-weight: 400;
    margin-top: 2px;
}

/* Sidebar Nav */
#sidebar .sidebar-nav {
    flex: 0 1 auto;
    overflow-y: auto;
    padding: 16px 0;
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 16px 24px 6px;
    display: block;
}

#sidebar ul.components {
    padding: 0;
    list-style: none;
    margin: 0;
}

#sidebar ul li a {
    padding: 12px 16px 12px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    transition: all var(--transition-base);
    border-radius: 0;
    position: relative;
    margin: 1px 12px;
    border-radius: var(--radius-md);
}

#sidebar ul li a:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--sidebar-active);
    font-weight: 600;
}

#sidebar ul li.active > a::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: var(--secondary-light);
    border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

#sidebar ul li a i,
#sidebar ul li a .ph {
    font-size: 1.15rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

/* Sidebar Footer / User Info */
.sidebar-user {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.07);
    margin-bottom: 10px;
    transition: background var(--transition-base);
}

.sidebar-user-card:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
}

.sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

.btn-sidebar-logout {
    width: 100%;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.12);
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    justify-content: center;
}

.btn-sidebar-logout:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
    color: #fca5a5;
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   CONTENT AREA
   ========================================================================== */

#content {
    flex: 1;
    padding: 28px 32px;
    min-height: 100vh;
    transition: all 0.3s;
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
}

/* ==========================================================================
   NAVBAR / TOPBAR
   ========================================================================== */

.navbar-custom {
    background: var(--navbar-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
    padding: 10px 22px;
    margin-bottom: 32px;
    border: 1px solid var(--card-border);
    transition: background 0.3s, border-color 0.3s;
    animation: slideDown 0.35s var(--transition-base);
}

/* Breadcrumb */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.topbar-breadcrumb .crumb-home {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.topbar-breadcrumb .crumb-home:hover {
    color: var(--primary-light);
}

.topbar-breadcrumb .crumb-sep {
    opacity: 0.4;
    font-size: 0.7rem;
}

/* Beta badge */
.badge-beta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--secondary-color);
    background: color-mix(in srgb, var(--secondary-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--secondary-color) 30%, transparent);
    border-radius: var(--radius-pill);
    cursor: default;
    user-select: none;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    vertical-align: middle;
}

.badge-beta i {
    font-size: 0.68rem;
}

.badge-beta:hover {
    background: color-mix(in srgb, var(--secondary-color) 20%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary-color) 12%, transparent);
}

[data-theme="dark"] .badge-beta {
    color: var(--secondary-light);
    background: color-mix(in srgb, var(--secondary-light) 10%, transparent);
    border-color: color-mix(in srgb, var(--secondary-light) 25%, transparent);
}

.topbar-breadcrumb .crumb-current {
    color: var(--text-color);
    font-weight: 600;
}

.topbar-divider {
    width: 1px;
    height: 24px;
    background: var(--divider);
}

/* Topbar Avatar */
.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 75, 131, 0.35);
    cursor: pointer;
    transition: transform var(--transition-bounce), box-shadow var(--transition-base);
}

.topbar-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 75, 131, 0.45);
}

.topbar-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Dark Mode Toggle */
.theme-switch {
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: color var(--transition-base), transform var(--transition-bounce);
    background: var(--bg-subtle);
    border: 1px solid var(--card-border);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-switch:hover {
    transform: rotate(20deg) scale(1.1);
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.theme-switch.active {
    background: var(--secondary-color);
    color: #fff;
    border-color: var(--secondary-color);
}

[data-theme="dark"] .theme-switch.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Mobile Sidebar Toggle */
#sidebarCollapse {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
}

/* ==========================================================================
   PAGE TITLE / SECTION HEADER
   ========================================================================== */

.page-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.page-title span {
    color: var(--primary-color);
}

[data-theme="dark"] .page-title span {
    color: var(--primary-light);
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Dark mode heading override */
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3,
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6,
[data-theme="dark"] .h1, [data-theme="dark"] .h2, [data-theme="dark"] .h3,
[data-theme="dark"] .h4, [data-theme="dark"] .h5, [data-theme="dark"] .h6 {
    color: var(--text-color);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card-custom {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    color: var(--text-color);
}

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

/* Disable hover-lift on cards inside forms or with explicit cursor:default */
.card-custom[style*="cursor:default"]:hover,
.card-custom form:only-child:hover,
form .card-custom:hover {
    transform: none;
    box-shadow: var(--shadow-card);
}

/* KPI Cards */
.card-kpi {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    padding: 24px;
    transition: transform var(--transition-bounce), box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card-kpi::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.card-kpi.kpi-blue::before   { background: var(--gradient-blue); }
.card-kpi.kpi-amber::before  { background: var(--gradient-amber); }
.card-kpi.kpi-green::before  { background: var(--gradient-emerald); }
.card-kpi.kpi-violet::before { background: var(--gradient-violet); }

.kpi-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-blue  .kpi-icon-wrap { background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(29,78,216,0.1) 100%); color: var(--accent-blue); }
.kpi-amber .kpi-icon-wrap { background: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(217,119,6,0.1) 100%);  color: var(--accent-amber); }
.kpi-green .kpi-icon-wrap { background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(5,150,105,0.1) 100%);  color: var(--accent-emerald); }
.kpi-violet .kpi-icon-wrap { background: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(109,40,217,0.1) 100%); color: var(--accent-violet); }

[data-theme="dark"] .kpi-blue  .kpi-icon-wrap { background: rgba(59,130,246,0.12); }
[data-theme="dark"] .kpi-amber .kpi-icon-wrap { background: rgba(245,158,11,0.12); }
[data-theme="dark"] .kpi-green .kpi-icon-wrap { background: rgba(16,185,129,0.12); }
[data-theme="dark"] .kpi-violet .kpi-icon-wrap { background: rgba(139,92,246,0.12); }

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-family: 'Inter', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
    letter-spacing: -1px;
}

.kpi-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity var(--transition-base), transform var(--transition-base), color var(--transition-fast);
}

.card-kpi:hover .kpi-link {
    opacity: 1;
    transform: translateY(0);
}

.kpi-link:hover {
    color: var(--primary-light);
}

[data-theme="dark"] .kpi-link { color: var(--primary-light); }

/* Card Icon (legacy) */
.card-icon {
    font-size: 2.4rem;
    color: var(--primary-color);
    opacity: 0.85;
    background: rgba(0, 75, 131, 0.06);
    padding: 14px;
    border-radius: var(--radius-md);
}

[data-theme="dark"] .card-icon {
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary-light);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.2px;
    padding: 9px 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

/* Ripple effect */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    margin-top: -50px;
    margin-left: -50px;
    background: rgba(255,255,255,0.3);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 75, 131, 0.28);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 75, 131, 0.38);
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-secondary-custom {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    box-shadow: 0 4px 14px rgba(225, 136, 0, 0.28);
}

.btn-secondary-custom:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(225, 136, 0, 0.38);
}

/* Loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin-loader 0.7s linear infinite;
    vertical-align: middle;
}

.table-custom {
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid var(--card-border);
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
}

.table-custom td {
    padding: 16px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-color);
}

.table-custom tbody tr {
    transition: all 0.2s ease;
}

.table-custom tbody tr:hover {
    background-color: var(--table-hover);
}

/* ==========================================================================
   INPUTS & FORMS
   ========================================================================== */

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control, .form-select {
    border-radius: var(--radius-md);
    padding: 11px 14px;
    border: 1.5px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all var(--transition-base);
    font-family: 'Montserrat', sans-serif;
}

.form-control:focus, .form-select:focus {
    background-color: var(--input-focus-bg);
    border-color: var(--primary-light);
    color: var(--text-color);
    box-shadow: 0 0 0 3.5px rgba(0, 107, 184, 0.14);
    outline: none;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 3.5px rgba(59, 130, 246, 0.18);
}

.form-control::placeholder {
    color: var(--text-soft);
}

.input-group-text {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border: 1.5px solid var(--input-border);
    border-right: none;
    background-color: var(--input-bg);
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0 14px;
    transition: all var(--transition-base);
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-light);
    color: var(--primary-color);
}

[data-theme="dark"] .input-group:focus-within .input-group-text {
    color: var(--primary-light);
}

/* Password toggle */
.password-toggle {
    cursor: pointer;
    transition: all var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-color) !important;
}

.password-wrap {
    position: relative;
}

.password-wrap .form-control {
    padding-right: 0.75rem;
}

/* Field validation */
.form-control.is-valid   { border-color: var(--accent-emerald); box-shadow: 0 0 0 3px rgba(16,185,129,0.12); }
.form-control.is-invalid { border-color: var(--accent-rose);    box-shadow: 0 0 0 3px rgba(244,63,94,0.12); }

/* ==========================================================================
   TABLES
   ========================================================================== */

.table {
    margin-bottom: 0;
    color: var(--text-color);
    font-size: 0.875rem;
}

.table > :not(caption) > * > * {
    padding: 14px 16px;
    border-bottom-color: var(--table-border);
    color: var(--text-color);
    background-color: transparent;
    vertical-align: middle;
}

.table.table-sm > :not(caption) > * > * {
    padding: 6px 12px;
}

.table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--table-border);
    padding-top: 12px;
    padding-bottom: 12px;
}

.table-hover tbody tr {
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    cursor: default;
}

.table-hover tbody tr:hover {
    background-color: var(--table-hover);
}

/* Clickable rows */
.table-hover tbody tr.row-clickable {
    cursor: pointer;
}

/* Row actions reveal on hover */
.row-actions {
    opacity: 0;
    transform: translateX(6px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    pointer-events: none;
}

.table-hover tbody tr:hover .row-actions {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* Table search */
.table-search-wrap {
    position: relative;
}

.table-search-wrap .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.table-search-input {
    padding-left: 36px !important;
    background: var(--input-bg) !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-color) !important;
}

.table-search-input::placeholder {
    color: var(--text-soft);
}

/* Filter toggle buttons (status chips) */
.filter-btn {
    border: 1px solid var(--card-border);
    background: var(--bg-subtle);
    color: var(--text-muted);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Table light head for dark mode */
[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light > :not(caption) > * > * {
    background-color: rgba(255,255,255,0.04) !important;
    color: var(--text-color);
}

/* ==========================================================================
   BADGES
   ========================================================================== */

.badge {
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

/* Pulsing active badge */
.badge-pulse {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-pulse .pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse-ring 1.8s ease infinite;
    flex-shrink: 0;
}

/* ==========================================================================
   SKELETON LOADING
   ========================================================================== */

.skeleton {
    background: linear-gradient(90deg, var(--bg-subtle) 25%, var(--card-border) 50%, var(--bg-subtle) 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }

/* ==========================================================================
   MODALS
   ========================================================================== */

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .modal-header { border-bottom-color: var(--divider); }
[data-theme="dark"] .modal-footer { border-top-color: var(--divider); }
[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

#toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-item {
    pointer-events: all;
    min-width: 300px;
    max-width: 380px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 14px 16px 10px;
    animation: toast-in 0.35s var(--transition-bounce);
    overflow: hidden;
    cursor: pointer;
}

.toast-item.hide {
    animation: toast-out 0.3s ease forwards;
}

.toast-item.toast-success { border-left: 4px solid var(--accent-emerald); }
.toast-item.toast-danger  { border-left: 4px solid var(--accent-rose); }
.toast-item.toast-warning { border-left: 4px solid var(--accent-amber); }
.toast-item.toast-info    { border-left: 4px solid var(--accent-blue); }

.toast-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-item.toast-success .toast-icon { color: var(--accent-emerald); }
.toast-item.toast-danger  .toast-icon { color: var(--accent-rose); }
.toast-item.toast-warning .toast-icon { color: var(--accent-amber); }
.toast-item.toast-info    .toast-icon { color: var(--accent-blue); }

.toast-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-color);
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
    transition: color var(--transition-fast);
    line-height: 1;
}

.toast-close:hover { color: var(--text-color); }

.toast-body {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-left: 26px;
    margin-bottom: 8px;
}

.toast-progress {
    height: 3px;
    border-radius: var(--radius-pill);
    margin-top: 6px;
    animation: progress-shrink linear forwards;
}

.toast-item.toast-success .toast-progress { background: var(--accent-emerald); }
.toast-item.toast-danger  .toast-progress { background: var(--accent-rose); }
.toast-item.toast-warning .toast-progress { background: var(--accent-amber); }
.toast-item.toast-info    .toast-progress { background: var(--accent-blue); }

/* ==========================================================================
   SCROLL TO TOP
   ========================================================================== */

#scrollTopBtn {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,75,131,0.35);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity var(--transition-base), transform var(--transition-bounce);
    z-index: 500;
}

#scrollTopBtn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#scrollTopBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,75,131,0.45);
}

/* ==========================================================================
   AUTH PAGE — LOGIN
   ========================================================================== */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #001e3c 0%, #003060 50%, #004B83 100%);
    position: relative;
    overflow: hidden;
}

/* Animated mesh background */
.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(59,130,246,0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(225,136,0,0.12) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating particles */
.auth-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-particle {
    position: absolute;
    bottom: -20px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    animation: float-particle linear infinite;
}

.auth-particle:nth-child(1)  { left: 5%;  width: 6px;  height: 6px;  animation-duration: 12s; animation-delay: 0s; }
.auth-particle:nth-child(2)  { left: 12%; width: 10px; height: 10px; animation-duration: 15s; animation-delay: 2s; background: rgba(225,136,0,0.2); }
.auth-particle:nth-child(3)  { left: 25%; width: 5px;  height: 5px;  animation-duration: 10s; animation-delay: 1s; }
.auth-particle:nth-child(4)  { left: 38%; width: 8px;  height: 8px;  animation-duration: 14s; animation-delay: 3s; background: rgba(59,130,246,0.25); }
.auth-particle:nth-child(5)  { left: 50%; width: 6px;  height: 6px;  animation-duration: 11s; animation-delay: 0.5s; }
.auth-particle:nth-child(6)  { left: 62%; width: 12px; height: 12px; animation-duration: 17s; animation-delay: 2.5s; background: rgba(255,255,255,0.08); }
.auth-particle:nth-child(7)  { left: 75%; width: 7px;  height: 7px;  animation-duration: 13s; animation-delay: 1.5s; background: rgba(225,136,0,0.15); }
.auth-particle:nth-child(8)  { left: 88%; width: 9px;  height: 9px;  animation-duration: 16s; animation-delay: 4s; }
.auth-particle:nth-child(9)  { left: 30%; width: 4px;  height: 4px;  animation-duration: 9s;  animation-delay: 0.8s; }
.auth-particle:nth-child(10) { left: 68%; width: 11px; height: 11px; animation-duration: 18s; animation-delay: 3.5s; background: rgba(59,130,246,0.2); }

.auth-card {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 70px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
    width: 100%;
    max-width: 420px;
    padding: 48px 40px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.12);
    animation: scaleIn 0.55s var(--transition-bounce);
}

.auth-logo {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo-icon {
    width: 84px;
    height: 84px;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.auth-logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.auth-logo-title {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.auth-logo-tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

.auth-alert {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 12px;
}

.auth-alert .btn-close {
    filter: invert(1) brightness(200%);
}

.auth-link {
    font-size: 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #fff;
}

/* Auth form inputs */
.auth-card .form-label {
    color: rgba(255,255,255,0.65);
}

.auth-card .form-control {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: var(--radius-md);
}

.auth-card .form-control::placeholder {
    color: rgba(255,255,255,0.35);
}

.auth-card .form-control:focus {
    background: rgba(255,255,255,0.14);
    border-color: var(--secondary-light);
    box-shadow: 0 0 0 3.5px rgba(225,136,0,0.2);
    color: #fff;
}

.auth-card .input-group-text {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
}

.auth-card .input-group:focus-within .input-group-text {
    border-color: var(--secondary-light);
    color: var(--secondary-light);
}

.auth-card .password-toggle {
    color: rgba(255,255,255,0.5);
}

.auth-card .password-toggle:hover {
    color: rgba(255,255,255,0.9) !important;
    background-color: rgba(255,255,255,0.15) !important;
}

.auth-card .btn-primary-custom {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary-color) 100%);
    box-shadow: 0 6px 22px rgba(225,136,0,0.4);
    padding: 13px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.auth-card .btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    box-shadow: 0 8px 28px rgba(225,136,0,0.5);
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

/* ==========================================================================
   TIMELINE (Atividades Recentes)
   ========================================================================== */

.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--divider);
    border-radius: var(--radius-pill);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    animation: fadeInUp 0.4s var(--transition-base) backwards;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--primary-color);
    flex-shrink: 0;
}

[data-theme="dark"] .timeline-dot {
    background: var(--primary-light);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.timeline-dot.dot-amber   { background: var(--accent-amber);   box-shadow: 0 0 0 2px var(--accent-amber); }
.timeline-dot.dot-emerald { background: var(--accent-emerald); box-shadow: 0 0 0 2px var(--accent-emerald); }
.timeline-dot.dot-violet  { background: var(--accent-violet);  box-shadow: 0 0 0 2px var(--accent-violet); }

.timeline-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
}

.timeline-time {
    font-size: 0.72rem;
    color: var(--text-soft);
    margin-top: 2px;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 60px 30px;
}

.empty-state-icon {
    font-size: 3.5rem;
    color: var(--text-soft);
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-bottom: 20px;
}

/* ==========================================================================
   CHARTS / DASHBOARD
   ========================================================================== */

/* Header icon badge for chart cards */
.chart-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.chart-icon.ci-blue    { background: linear-gradient(135deg, rgba(59,130,246,0.16), rgba(29,78,216,0.10));  color: var(--accent-blue); }
.chart-icon.ci-amber   { background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(217,119,6,0.10));  color: var(--accent-amber); }
.chart-icon.ci-violet  { background: linear-gradient(135deg, rgba(139,92,246,0.16), rgba(109,40,217,0.10));  color: var(--accent-violet); }
.chart-icon.ci-cyan    { background: linear-gradient(135deg, rgba(6,182,212,0.16), rgba(8,145,178,0.10));    color: #06b6d4; }
.chart-icon.ci-emerald { background: linear-gradient(135deg, rgba(16,185,129,0.16), rgba(5,150,105,0.10));   color: var(--accent-emerald); }

/* Chart cards: subtle accent glow on hover (above the base card-custom lift) */
.chart-card { position: relative; }
.chart-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
    box-shadow: inset 0 0 0 1.5px rgba(0,107,184,0.14);
}
[data-theme="dark"] .chart-card::after { box-shadow: inset 0 0 0 1.5px rgba(59,130,246,0.18); }
.chart-card:hover::after { opacity: 1; }

/* Canvas entrance reveal */
@keyframes chartReveal {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
.chart-card canvas { animation: chartReveal 0.55s var(--transition-base) both; }

/* Interactive custom legend pills */
.chart-legend-pill {
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}
.chart-legend-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-xs); }
.chart-legend-pill.is-hidden { opacity: 0.4; }
.chart-legend-pill.is-hidden .legend-dot { background: var(--text-soft) !important; }

/* Smooth empty-state fade so it doesn't pop in over the canvas */
#noDataMessage,
.card-custom .empty-state[style*="inset"] { animation: fadeInUp 0.4s var(--transition-base) both; }

/* ==========================================================================
   RECURSOS DA SEMANA
   ========================================================================== */

/* Card em destaque = sugestão para a semana filtrada */
.recurso-destaque {
    border: 1.5px solid var(--secondary-color);
    box-shadow: 0 6px 24px rgba(225,136,0,0.14);
}

/* Lista de músicas sugeridas */
.recurso-musica-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    margin-bottom: 8px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.recurso-musica-item:last-child { margin-bottom: 0; }
.recurso-musica-item:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-xs);
}

.recurso-musica-num {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--gradient-secondary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.recurso-musica-nome {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   UX REFINEMENTS (T1–T3)
   ========================================================================== */

/* --- T1: Foco visível para navegação por teclado --- */
:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.btn:focus-visible,
a:focus-visible,
.form-check-input:focus-visible,
.theme-switch:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}
/* Inputs já têm anel via box-shadow no :focus — evita anel duplo */
.form-control:focus-visible,
.form-select:focus-visible { outline: none; }
/* Links da sidebar: anel claro sobre fundo escuro */
#sidebar a:focus-visible,
.btn-sidebar-logout:focus-visible { outline-color: var(--secondary-light); }

/* --- T1: Badges de status centralizados (membro/participante/visitante…) --- */
.badge-membro       { background: rgba(16,185,129,0.12); color: var(--accent-emerald); border: 1px solid rgba(16,185,129,0.22); }
.badge-participante { background: rgba(139,92,246,0.12); color: var(--accent-violet);  border: 1px solid rgba(139,92,246,0.22); }
.badge-visitante    { background: rgba(59,130,246,0.12); color: var(--accent-blue);    border: 1px solid rgba(59,130,246,0.22); }
.badge-inativo      { background: var(--bg-subtle);      color: var(--text-muted);     border: 1px solid var(--card-border); }
.badge-batizado     { background: rgba(6,182,212,0.12);  color: #06b6d4;               border: 1px solid rgba(6,182,212,0.25); }

/* --- T2: Ícone-chip ao lado do título da página --- */
.page-head { display: flex; align-items: center; gap: 14px; }
.page-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0,107,184,0.14), rgba(0,75,131,0.07));
    color: var(--primary-color);
}
[data-theme="dark"] .page-icon {
    color: var(--primary-light);
    background: rgba(59,130,246,0.14);
}

/* --- T3: Polimento dos empty-states (ícone em badge circular) --- */
.empty-state-icon {
    width: 88px;
    height: 88px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 38%, var(--bg-subtle) 0%, transparent 72%);
}

/* --- T3: Shimmer de carregamento (gráficos) --- */
.chart-skeleton {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(100deg,
        var(--bg-subtle) 30%,
        rgba(255,255,255,0.35) 50%,
        var(--bg-subtle) 70%);
    background-size: 600px 100%;
    animation: shimmer 1.3s infinite linear;
    z-index: 5;
}
[data-theme="dark"] .chart-skeleton {
    background: linear-gradient(100deg,
        rgba(255,255,255,0.04) 30%,
        rgba(255,255,255,0.10) 50%,
        rgba(255,255,255,0.04) 70%);
    background-size: 600px 100%;
}

/* --- T3: Tabelas empilhadas (card) no celular --- */
@media (max-width: 575.98px) {
    .table-stack thead { display: none; }
    .table-stack tbody tr {
        display: block;
        border: 1px solid var(--card-border);
        border-radius: var(--radius-md);
        margin-bottom: 12px;
        padding: 4px 2px;
        background: var(--card-bg);
    }
    .table-stack tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        border: none !important;
        padding: 9px 14px !important;
        text-align: right;
    }
    .table-stack tbody td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
    }
    /* Células sem rótulo (ex.: coluna de seta) escondem o ::before vazio */
    .table-stack tbody td[data-label=""]::before { content: none; }
    .table-stack tbody td:last-child { justify-content: flex-end; }
    .table-stack .row-actions { opacity: 1; transform: none; pointer-events: auto; }
}

/* ==========================================================================
   MISCELLANEOUS
   ========================================================================== */

.text-muted { color: var(--text-muted) !important; }
.text-soft  { color: var(--text-soft)  !important; }

[data-theme="dark"] .bg-light {
    background-color: rgba(255,255,255,0.05) !important;
}

/* Dividers */
hr {
    border-color: var(--divider);
    opacity: 1;
}

/* Section separator label */
.section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-soft);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--divider);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 991.98px) {
    #content {
        max-width: 100vw;
        padding: 20px;
    }
}

/* Em telas sem hover (toque), as ações das linhas ficam sempre visíveis */
@media (hover: none) {
    .row-actions {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        left: calc(-1 * var(--sidebar-width));
        height: 100vh;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #sidebar.active {
        left: 0;
        box-shadow: var(--shadow-sidebar);
    }

    #content {
        padding: 16px;
        max-width: 100vw;
    }

    .navbar-custom {
        border-radius: var(--radius-md);
        padding: 8px 16px;
    }

    #toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .toast-item {
        min-width: unset;
        max-width: 100%;
    }

    .kpi-value {
        font-size: 1.8rem;
    }

    /* Ações de linha sempre visíveis no celular */
    .row-actions {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    /* Título da página menor e ícone-chip reduzido */
    .page-title { font-size: 1.3rem; }
    .page-icon { width: 38px; height: 38px; font-size: 1.2rem; }
}

/* ==========================================================================
   ACCESSIBILITY — Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   DARK MODE — Badge Fixes
   ========================================================================== */

[data-theme="dark"] .badge.bg-info {
    background: rgba(59,130,246,0.15) !important;
    color: var(--accent-blue) !important;
    border: 1px solid rgba(59,130,246,0.25);
}

[data-theme="dark"] .badge.bg-success {
    background: rgba(16,185,129,0.15) !important;
    color: var(--accent-emerald) !important;
}

[data-theme="dark"] .badge.bg-secondary {
    background: rgba(148,163,184,0.15) !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .badge.bg-warning {
    background: rgba(245,158,11,0.15) !important;
    color: var(--accent-amber) !important;
}

[data-theme="dark"] .badge.bg-danger {
    background: rgba(244,63,94,0.15) !important;
    color: var(--accent-rose) !important;
}

/* Dark mode checkbox area in forms */
[data-theme="dark"] .bg-light.border {
    background-color: rgba(255,255,255,0.04) !important;
    border-color: var(--card-border) !important;
}

/* ==========================================================================
   FORM SUBMIT ANIMATION
   ========================================================================== */

form:has([type="submit"]) [type="submit"] {
    transition: all var(--transition-base);
}

/* ==========================================================================
   ATTENDANCE COUNTER CARDS
   ========================================================================== */

.attendance-counter {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-md);
    transition: transform var(--transition-bounce);
}

.attendance-counter:hover {
    transform: scale(1.03);
}

/* Logos: Ocultar logo preta em tela (usada apenas para impressão) */
.logo-preta {
    display: none;
}

/* Custom Scrollbar for Offcanvas Chart */
#ocChartContainer::-webkit-scrollbar {
    height: 6px;
}
#ocChartContainer::-webkit-scrollbar-track {
    background: var(--bg-subtle);
    border-radius: var(--radius-pill);
}
#ocChartContainer::-webkit-scrollbar-thumb {
    background: var(--text-soft);
    border-radius: var(--radius-pill);
    opacity: 0.5;
}
#ocChartContainer::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
[data-theme="dark"] #ocChartContainer::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Subtle swipe animation for scroll indicator */
@keyframes swipe-pulse {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50% { transform: translateX(-6px); opacity: 1; }
}
.animate-swipe {
    display: inline-block;
    animation: swipe-pulse 2s infinite ease-in-out;
}

/* ==========================================================================
   PRINT STYLES (Relatórios Profissionais)
   ========================================================================== */

@media print {
    /* Ocultar elementos desnecessários na impressão */
    .print-hide,
    #sidebar,
    .navbar-custom,
    .btn,
    .theme-switch,
    .sidebar-overlay,
    .toast-container {
        display: none !important;
    }

    /* Resetar layout para usar 100% da folha */
    body {
        background-color: #fff !important;
        color: #000 !important;
    }
    
    .wrapper, #content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-shadow: none !important;
    }

    /* Estilo dos Cards em impressão */
    .card-custom {
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Alternar Logos: Exibir preta, ocultar colorida */
    .logo-colorida {
        display: none !important;
    }
    .logo-preta {
        display: inline-block !important;
        filter: none !important;
    }

    /* Estilo de Tabelas em Impressão (Design Limpo) */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 1rem;
    }
    th, td {
        border: 1px solid #ccc !important;
        padding: 6px 10px !important;
        font-size: 11pt !important;
        color: #000 !important;
    }
    th {
        background-color: #f1f5f9 !important;
        -webkit-print-color-adjust: exact;
        font-weight: 600 !important;
        color: #1e293b !important;
    }
    
    /* Quebra de páginas suave */
    tr, .page-break-avoid {
        page-break-inside: avoid;
    }
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* ==========================================================================
   GLASSMORPHISM SKELETONS
   ========================================================================== */

.chart-skeleton {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: linear-gradient(110deg, rgba(255,255,255,0.05) 8%, rgba(255,255,255,0.15) 18%, rgba(255,255,255,0.05) 33%);
    background-size: 200% 100%;
    animation: skeletonShine 1.5s linear infinite;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

[data-theme="dark"] .chart-skeleton {
    background: linear-gradient(110deg, rgba(255,255,255,0.02) 8%, rgba(255,255,255,0.06) 18%, rgba(255,255,255,0.02) 33%);
    border: 1px solid rgba(255,255,255,0.03);
}

@keyframes skeletonShine {
    to { background-position: -200% 0; }
}

/* ==========================================================================
   USABILITY & ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

.row-clickable {
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.row-clickable:hover {
    background-color: var(--table-hover) !important;
}

.row-clickable:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* ==========================================================================
   MOBILE TABLES (RESPONSIVE STACK)
   ========================================================================== */

@media (max-width: 768px) {
    .table-stack {
        display: block;
        width: 100%;
        border: none !important;
    }
    
    .table-stack thead {
        display: none; /* Hide header completely */
    }
    
    .table-stack tbody {
        display: block;
        width: 100%;
    }
    
    .table-stack tr {
        display: block;
        margin-bottom: 16px;
        background: var(--card-bg);
        border: 1px solid var(--card-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-xs);
        padding: 8px 12px;
    }
    
    .table-stack td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 4px;
        border-bottom: 1px dashed var(--divider);
        width: 100%;
        text-align: left !important;
    }
    
    .table-stack td:last-child {
        border-bottom: none;
    }
    
    /* Using data-label for headers */
    .table-stack td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.72rem;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: 8px;
        letter-spacing: 0.5px;
    }
    
    /* Action groups expand on mobile */
    .table-stack td .btn-group,
    .table-stack td .dropdown,
    .table-stack td .dropdown > button {
        width: 100%;
        display: flex;
    }
    
    .table-stack td .btn-group .btn {
        flex: 1;
    }
    
    .table-stack td .row-actions {
        width: 100%;
        justify-content: flex-start !important;
        flex-wrap: wrap;
    }
}

/* Seletor de igreja (topbar): não espreme os botões no celular. */
.seletor-igreja select {
    max-width: 220px;
    text-overflow: ellipsis;
}
@media (max-width: 575.98px) {
    .seletor-igreja .ph-church { display: none; }
    .seletor-igreja select { max-width: 132px; }
}

/* Cadastro de usuário: lista de regras da senha. */
.senha-regras li { color: var(--text-muted); transition: color .15s; }
.senha-regras li.ok { color: var(--bs-success, #198754); }
.senha-regras li i { vertical-align: -2px; }

/* Botões de gênero (Masculino/Feminino): o texto nunca quebra; em colunas estreitas o ícone some */
.btn-group.w-100[aria-label*="nero"] { container-type: inline-size; }
.btn-group.w-100[aria-label*="nero"] > .btn {
    white-space: nowrap;
    flex: 1 1 0;
    min-width: 0;
    padding-left: .5rem;
    padding-right: .5rem;
}
@container (max-width: 210px) {
    .btn-group.w-100[aria-label*="nero"] > .btn > i { display: none; }
}

/* ==========================================================================
   DASHBOARD (redesenho)
   ========================================================================== */
.min-w-0 { min-width: 0; }

.kpi-sub { font-size: .78rem; color: var(--text-muted); margin-top: 8px; }
.dash-kpis .card-kpi { padding: 20px; height: 100%; }
.dash-kpis .kpi-value { font-size: 2.4rem; }

.dash-card { padding: 24px; }
.dash-card-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 20px;
}
.dash-card-title { font-weight: 700; font-size: 1.05rem; margin: 0; color: var(--text-color); }
.dash-select { width: auto; min-width: 170px; max-width: 100%; border-radius: 8px; font-weight: 500; }
.dash-select-mes { min-width: 0; }

.dash-chart-bars { position: relative; width: 100%; height: 260px; }
.dash-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dash-stat {
    display: flex; flex-direction: column; gap: 2px; padding: 8px 16px; min-width: 96px;
    border: 1px solid var(--divider); border-radius: 10px; background: var(--card-bg);
}
.dash-stat span { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.dash-stat strong { font-size: 1.25rem; color: var(--text-color); }
.dash-note { margin: 14px 0 0; font-size: .82rem; color: var(--text-muted); display: flex; gap: 6px; align-items: flex-start; }

.dash-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    gap: 6px; padding: 36px 16px; color: var(--text-muted); font-size: .88rem;
}
.dash-empty i { font-size: 2.4rem; opacity: .55; }
.dash-empty strong { color: var(--text-color); }

.dash-section-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 12px; margin: 36px 0 16px;
}
.dash-section-title { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--text-color); }

.dash-donut { display: flex; align-items: center; gap: 24px; }
.dash-donut-canvas { position: relative; flex: 0 0 168px; width: 168px; min-width: 0; height: 168px; overflow: hidden; }
.dash-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 0; min-width: 0; }
.dash-legend li {
    display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; align-items: center; gap: 8px;
    padding: 8px 0; border-bottom: 1px solid var(--divider); font-size: .9rem;
}
.dash-legend li:last-child { border-bottom: 0; }
.dash-legend .dot { width: 12px; height: 12px; border-radius: 4px; }
.dash-legend .lg-nome { color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-legend .lg-valor { font-weight: 700; color: var(--text-color); font-variant-numeric: tabular-nums; }
.dash-legend .lg-pct { color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

.aniv-lista { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.aniv-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.aniv-item:last-child { border-bottom: 0; }
.aniv-data {
    flex: 0 0 48px; text-align: center; border-radius: 10px; padding: 4px 0; line-height: 1.1;
    background: rgba(139, 92, 246, .12); color: var(--accent-violet);
}
.aniv-data strong { display: block; font-size: 1.15rem; }
.aniv-data small { font-size: .65rem; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.aniv-nome { flex: 1 1 auto; min-width: 0; font-weight: 500; color: var(--text-color); }
.aniv-item.is-passado .aniv-nome { color: var(--text-muted); font-weight: 400; }
.aniv-item.is-passado .aniv-data { opacity: .55; }
.aniv-item.is-hoje .aniv-data { background: var(--accent-violet); color: #fff; }
.aniv-tag { font-size: .7rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-violet); color: #fff; }
.dash-empty-inline { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 0; color: var(--text-muted); font-size: .88rem; }
.dash-empty-inline i { font-size: 2.2rem; opacity: .55; }

@media (max-width: 575.98px) {
    .dash-card { padding: 18px; }
    .dash-kpis .card-kpi { padding: 14px; }
    .dash-kpis .kpi-value { font-size: 1.9rem; }
    .dash-kpis .kpi-icon-wrap { width: 36px; height: 36px; font-size: 1.1rem; }
    .dash-kpis .kpi-label { font-size: .68rem; letter-spacing: .4px; }
    .kpi-sub { font-size: .7rem; }
    .dash-donut { flex-direction: column; align-items: stretch; gap: 16px; }
    .dash-donut-canvas { flex-basis: auto; height: 180px; }
    .dash-select { width: 100%; }
    .dash-select-mes { width: auto; }
}

/* ==========================================================================
   ORAÇÕES — lista compacta
   ========================================================================== */
.pedido-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.pedido-busca { flex: 1 1 220px; max-width: 360px; }
.pedido-filtros { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; max-width: 100%; padding: 2px 0; }
.pedido-filtros::-webkit-scrollbar { display: none; }
.pedido-filtros .filter-btn { white-space: nowrap; flex: 0 0 auto; }
.pedido-cont { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: rgba(100,116,139,.18); }
.filter-btn.active .pedido-cont { background: rgba(255,255,255,.25); }
.pedido-total { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

.pedido-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.pedido-item {
    display: flex; align-items: flex-start; gap: 10px; min-width: 0;
    padding: 12px 12px 12px 14px; border: 1px solid var(--card-border); border-radius: var(--radius-md);
    background: var(--card-bg); box-shadow: var(--shadow-xs);
}
.pedido-corpo { flex: 1 1 auto; min-width: 0; }
.pedido-texto {
    margin: 0 0 4px; font-size: .92rem; line-height: 1.4; color: var(--text-color); cursor: pointer;
    overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pedido-texto.is-aberto { -webkit-line-clamp: unset; display: block; }
.pedido-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .75rem; color: var(--text-muted); }
.pedido-meta span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.pedido-meta i { opacity: .8; }

.pedido-acoes { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.pedido-status {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px;
    border: 1px solid var(--divider); background: transparent; color: var(--text-color); font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.pedido-mais { width: 36px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 1.2rem; }
.pedido-mais:hover, .pedido-status:hover { background: var(--divider); }
.pedido-ponto { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; display: inline-block; flex: 0 0 auto; }
.st-aberto .pedido-status .pedido-ponto, .pp-aberto { background: #ef4444; }
.st-sem_retorno .pedido-status .pedido-ponto, .pp-sem_retorno { background: #f59e0b; }
.st-respondido .pedido-status .pedido-ponto, .pp-respondido { background: #10b981; }
.st-respondido .pedido-texto { color: var(--text-muted); }
.pedido-menu { min-width: 170px; font-size: .9rem; }
.pedido-menu .dropdown-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 44px; }
.pedido-menu form { margin: 0; }

.pedido-fab {
    position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 1030;
    width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--primary-color); color: #fff; font-size: 1.6rem; box-shadow: 0 6px 18px rgba(0,0,0,.28); text-decoration: none;
}
.pedido-fab:hover { color: #fff; filter: brightness(1.1); }

@media (min-width: 992px) { .pedido-lista { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767.98px) { .pedido-lista { padding-bottom: 80px; } }

/* Orações no celular: texto + status + "⋯" na 1ª linha; pessoa/célula/data na 2ª (largura toda) */
@media (max-width: 575.98px) {
    .pedido-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 6px; row-gap: 2px; align-items: start; padding: 10px 6px 10px 14px; }
    .pedido-corpo, .pedido-acoes { display: contents; }
    .pedido-texto { grid-column: 1; grid-row: 1; margin: 0; align-self: center; }
    .pedido-acoes > .dropdown:first-child { grid-column: 2; grid-row: 1; }
    .pedido-acoes > .dropdown:last-child { grid-column: 3; grid-row: 1; }
    .pedido-meta { grid-column: 1 / -1; grid-row: 2; padding-right: 8px; }
    .pedido-mais { width: 32px; }
}
