/* ==========================================================================
   DESIGN ALINHADO COM WWW.MARIANDRADE.ADV.BR - EXPANDIDO (24 FERRAMENTAS)
   ========================================================================== */

:root {
    /* Brand Palette - www.mariandrade.adv.br */
    --primary-color: #000000;         
    --secondary-color: #FFFFFF;       
    --accent-color: #E3E3E3;          /* Silver / Prata */
    --dark-gray: #252625;             /* Grafite escuro */
    --light-bg: #f4f4f4;              /* Off-white / Gelo */
    --bg-card: #FFFFFF;               
    
    /* Text Colors */
    --text-primary: #252625;          
    --text-muted: #767676;            
    --text-light: #E3E3E3;
    
    /* Status Colors */
    --color-success: #10b981;         
    --color-info: #3b82f6;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --bg-danger-light: #fef2f2;
    --text-danger: #b91c1c;

    /* Fonts */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
    
    /* Borders & Shadows */
    --border-color: #E3E3E3;
    --border-radius-lg: 10px;
    --border-radius-md: 6px;
    --border-radius-sm: 4px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

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

.hidden {
    display: none !important;
}

/* Titles style matching the landing page */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

.section-title-desc {
    margin-bottom: 30px;
}

.section-title-desc h2 {
    font-size: 28px;
    font-weight: 400;
    color: var(--primary-color);
}

.section-title-desc p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ==========================================================================
   AUTHENTICATION LAYER (LOGIN SCREEN)
   ========================================================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-bg);
    padding: 20px;
}

.login-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 50px 40px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.brand-monogram {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 65px;
    height: 65px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 1px solid var(--accent-color);
}

.login-header h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-family: var(--font-body);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.brand-divider {
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 20px auto;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: #fafbfc;
    transition: var(--transition);
    outline: none;
    font-size: 15px;
}

.password-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: var(--secondary-color);
}

.btn-toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.error-message {
    display: none;
    color: var(--text-danger);
    background-color: var(--bg-danger-light);
    border-radius: var(--border-radius-md);
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 20px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    font-weight: 700;
}

.btn-primary {
    background-color: var(--dark-gray);
    color: var(--secondary-color);
    border: 1px solid var(--accent-color);
    padding: 14px 30px;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border-radius: 0px; 
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.login-footer {
    text-align: center;
    margin-top: 35px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   MAIN DASHBOARD LAYOUT & SIDEBAR
   ========================================================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation - Estilo Sanfona/Accordion */
.sidebar {
    width: 280px;
    background-color: #000000;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    border-right: 1px solid #1a1a1a;
    height: 100vh;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: #000;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #252625;
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 38px;
    height: 38px;
    background-color: var(--dark-gray);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius-sm);
}

.logo-text {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 16px;
}

.brand-names h2 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.2;
}

.badge-status {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

/* Accordion Grouping inside Sidebar */
.sidebar-group {
    border-bottom: 1px solid #0d0d0d;
    margin-bottom: 4px;
}

.group-header {
    width: 100%;
    background: none;
    border: none;
    color: #888;
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.group-header:hover {
    color: #fff;
}

.group-header i {
    font-size: 10px;
    transition: var(--transition);
}

.group-items {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.sidebar-group.active .group-items {
    max-height: 500px; /* Allow expansion */
}

.sidebar-group.active .group-header i {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.sidebar-group.active .group-header {
    color: #fff;
}

.nav-link {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    padding: 10px 24px;
    color: #a0a5b0;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    gap: 12px;
    font-weight: 400;
    font-size: 13.5px;
    position: relative;
}

.nav-link i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #666;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--dark-gray);
    color: var(--secondary-color);
}

.nav-link:hover i {
    color: var(--secondary-color);
}

.nav-link.active {
    background-color: var(--dark-gray);
    color: var(--secondary-color);
    font-weight: 700;
    border-left: 3px solid var(--accent-color);
}

.nav-link.active i {
    color: var(--secondary-color);
}

.nav-badge-fase {
    position: absolute;
    right: 24px;
    background-color: #1a1a1a;
    color: #888;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 2px;
    border: 1px solid #333;
    text-transform: uppercase;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid #1a1a1a;
    background-color: #0c0c0c;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background-color: var(--dark-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    border: 1px solid #333;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary-color);
}

.user-role {
    font-size: 11px;
    color: #888;
}

.btn-logout {
    background: none;
    border: 1px solid #292929;
    border-radius: var(--border-radius-sm);
    color: #ef4444;
    padding: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Content Area Layout */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

/* Global Content Header */
.content-header {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-welcome h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--primary-color);
    font-weight: 400; 
}

.date-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

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

.connection-status {
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connection-status.connected {
    color: var(--text-primary);
}

.connection-status i {
    font-size: 8px;
    color: #10b981;
}

/* Tab Management */
.tab-content {
    display: none;
    padding: 40px;
    flex: 1;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* ==========================================================================
   VIEW: INÍCIO (DASHBOARD)
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.grid-col-2 {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.grid-col-1 {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* General Card Design */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-widget {
    padding: 30px;
}

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

.card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-widget {
    font-size: 18px;
    color: var(--primary-color);
}

.card-header h3 {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.widget-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Badges */
.badge-info, .badge-success, .badge-warning {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid var(--border-color);
}

.badge-info {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.badge-success {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Widget: Recessos & Agenda lists styling */
.recessos-list, .compromissos-list {
    list-style: none;
}

.recessos-list li, .compromissos-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.recessos-list li:hover, .compromissos-list li:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.recesso-left, .compromisso-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.recesso-cal-icon, .compromisso-cal-icon {
    width: 38px;
    height: 38px;
    background-color: var(--light-bg);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    text-align: center;
}

.recesso-title-tag, .compromisso-details {
    display: flex;
    flex-direction: column;
}

.recesso-name, .compromisso-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-color);
}

.recesso-type, .compromisso-time-source {
    font-size: 10.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.recesso-days-badge, .compromisso-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--light-bg);
    padding: 4px 10px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.recessos-list li.municipal-recesso { border-left: 3px solid var(--text-muted); }
.recessos-list li.adv-recesso { border-left: 3px solid var(--primary-color); }

/* Custom items for source representation */
.compromissos-list li.calcom-event { border-left: 3px solid var(--primary-color); }
.compromissos-list li.google-event { border-left: 3px solid var(--text-muted); }

/* Google OAuth block styling */
.google-auth-box {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    justify-content: center;
}

.calendar-integration-badges {
    display: flex;
    gap: 10px;
}

#google-status-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
}

.badge-status-active {
    background-color: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0 !important;
}

.badge-status-inactive {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Widget: Call to Action Card */
.card-cta {
    background-color: var(--dark-gray);
    color: var(--secondary-color);
    padding: 35px 30px;
    position: relative;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius-lg);
}

.cta-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 0px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border: 1px solid var(--primary-color);
}

.card-cta h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--secondary-color);
    margin-bottom: 12px;
    font-weight: 400;
}

.card-cta p {
    font-size: 13px;
    color: var(--accent-color);
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-accent {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--accent-color);
    padding: 12px 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    border-radius: 0px;
}

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

.btn-large {
    padding: 14px 28px;
    width: 100%;
}

/* Mini Stats Box */
.stats-mini-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-box {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    line-height: 1.2;
}

/* ==========================================================================
   VIEW: LINKS ESSENCIAIS (DASHBOARD GRID)
   ========================================================================== */
.links-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.quick-links-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-link-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    transition: var(--transition);
    text-decoration: none;
}

.quick-link-item:hover {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
}

.link-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 14px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.link-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.link-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-color);
}

.link-url {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* Specific colors overrides */
.link-drive .link-icon { color: #1a73e8; }
.link-docs .link-icon { color: #1a73e8; }
.link-claude .link-icon { color: #d97706; }
.link-tjmg .link-icon { color: #475569; }
.link-trt3 .link-icon { color: #15803d; }

/* ==========================================================================
   VIEW: VISÃO 360º (KANBAN)
   ========================================================================== */
.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.kanban-title-desc h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    color: var(--primary-color);
    font-weight: 400;
}

.kanban-title-desc p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    height: calc(100vh - 240px);
    min-height: 480px;
}

.kanban-column {
    background-color: #fafafa;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.column-header {
    padding: 18px;
    background-color: var(--secondary-color);
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
    border-bottom: 1px solid var(--border-color);
}

.column-title-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-count {
    font-size: 10px;
    font-weight: 700;
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 2px 8px;
    border: 1px solid var(--border-color);
}

.column-bar {
    height: 2px;
    margin-top: 10px;
}

.bar-triagem { background-color: var(--text-muted); }
.bar-coleta { background-color: var(--accent-color); }
.bar-audiencia { background-color: var(--dark-gray); }
.bar-execucao { background-color: var(--primary-color); }

.column-cards {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
}

/* Kanban Cards */
.kanban-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition);
    user-select: none;
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.kanban-card:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: var(--light-bg);
    border: 1px dashed var(--primary-color);
}

.sortable-drag {
    transform: rotate(1deg);
    box-shadow: var(--shadow-lg);
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-client-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.3;
}

.btn-card-drive {
    color: var(--text-muted);
    font-size: 13px;
    padding: 2px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.btn-card-drive:hover {
    color: var(--primary-color);
    background-color: var(--light-bg);
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 11px;
}

.card-process-num {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 9.5px;
}

.btn-card-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.kanban-card:hover .btn-card-delete {
    opacity: 1;
}

.btn-card-delete:hover {
    color: var(--color-danger);
}

/* ==========================================================================
   VIEW: GESTOR DE CLIENTES (CRM) & FINANCEIRO TABLES
   ========================================================================== */
.crm-search-row {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
}

.search-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

.search-wrapper input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    outline: none;
    background-color: #fafbfc;
    transition: var(--transition);
}

.search-wrapper input:focus {
    border-color: var(--primary-color);
    background-color: var(--secondary-color);
}

.crm-table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius-md);
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
}

.crm-table th, .crm-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.crm-table th {
    background-color: #fafafa;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.5px;
}

.crm-table tr:hover td {
    background-color: #fafafa;
}

.btn-action-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}

.btn-action-icon:hover {
    color: var(--primary-color);
}

.btn-action-delete:hover {
    color: var(--color-danger);
}

/* ==========================================================================
   VIEW: TEMPLATES JURÍDICOS Split Panel
   ========================================================================== */
.templates-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.template-categories {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.template-categories button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-muted);
}

.template-categories button.active, .template-categories button:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.templates-list-ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.templates-list-ul li button {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 12px;
    font-size: 12.5px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.templates-list-ul li button:hover, .templates-list-ul li button.active {
    background-color: var(--light-bg);
    color: var(--primary-color);
    font-weight: 700;
}

.templates-editor-area {
    width: 100%;
}

.editor-card {
    padding: 24px;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.editor-header h3 {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
}

.editor-toolbar {
    background-color: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-editor-tool {
    background: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    width: 26px;
    height: 26px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: var(--transition);
}

.btn-editor-tool:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

.rich-editor-content {
    min-height: 280px;
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    outline: none;
    font-size: 13.5px;
    background-color: #fafbfc;
    line-height: 1.7;
    white-space: pre-wrap;
}

.rich-editor-content:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.editor-footer .btn-accent {
    padding: 8px 18px;
    font-size: 12px;
}

/* ==========================================================================
   VIEW: CALCULADORA DE PRAZOS & HONORÁRIOS & RESCISÃO
   ========================================================================== */
.form-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-layout input, .form-layout select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    background-color: #fafbfc;
    outline: none;
    transition: var(--transition);
}

.form-layout input:focus, .form-layout select:focus {
    border-color: var(--primary-color);
    background-color: var(--secondary-color);
}

/* Calculation Result Box styling */
.calc-results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
}

.calc-results-box {
    animation: fadeIn 0.3s ease-out;
}

.calc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13.5px;
}

.calc-result-row:last-child {
    border-bottom: none;
    font-size: 15px;
    font-weight: 700;
    padding-top: 16px;
}

.calc-result-label {
    color: var(--text-muted);
    font-weight: 600;
}

.calc-result-value {
    color: var(--primary-color);
    font-weight: 700;
}

.calc-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 14px;
    border-radius: var(--border-radius-md);
    font-size: 12px;
    font-weight: 700;
}

.calc-alert-danger {
    background-color: #fef2f2;
    color: var(--text-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.calc-alert-info {
    background-color: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

/* ==========================================================================
   VIEW: CALENDÁRIO FORENSE
   ========================================================================== */
.calendar-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

.calendar-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header-nav h3 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-top: 8px;
}

.calendar-cell {
    aspect-ratio: 1.2;
    background-color: var(--secondary-color);
    border: 1px solid #f1f5f9;
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    padding: 6px;
    font-size: 11px;
    font-weight: 700;
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-cell:hover {
    border-color: var(--primary-color);
    background-color: var(--light-bg);
}

.calendar-cell-other {
    opacity: 0.25;
}

.calendar-cell-today {
    background-color: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    border-color: var(--primary-color);
}

/* Event marks inside calendar cells */
.calendar-cell-event::after {
    content: '';
    width: 5px;
    height: 5px;
    background-color: var(--text-muted);
    border-radius: 50%;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
}

.calendar-cell-recesso {
    background-color: #faf0e6;
    border-color: rgba(197, 168, 128, 0.2);
}

.calendar-cell-recesso::after {
    background-color: var(--color-warning);
}

.calendar-cell-holiday {
    background-color: #eff6ff;
    border-color: rgba(59, 130, 246, 0.15);
}

.calendar-cell-holiday::after {
    background-color: var(--color-info);
}

/* Event detail panel styling */
.events-panel-card {
    min-height: 380px;
}

.calendar-events-list {
    list-style: none;
}

.calendar-events-list li {
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    font-size: 12px;
    background-color: #fafafa;
}

.calendar-events-list li.evt-recesso {
    border-left: 3px solid var(--color-warning);
}

.calendar-events-list li.evt-holiday {
    border-left: 3px solid var(--color-info);
}

.evt-date-badge {
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 2px;
}

/* ==========================================================================
   VIEW: CHATBOT JURÍDICO SIMULATOR
   ========================================================================== */
.chatbot-sim-layout {
    max-width: 600px;
    margin: 20px auto;
}

.chatbot-card {
    display: flex;
    flex-direction: column;
    height: 480px;
    padding: 0;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: #fafafa;
}

.msg-bot, .msg-user {
    max-width: 80%;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
}

.msg-bot {
    align-self: flex-start;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 0 10px 10px 10px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-color);
}

.msg-user {
    align-self: flex-end;
    background-color: var(--dark-gray);
    color: var(--secondary-color);
    border-radius: 10px 0 10px 10px;
}

.chatbot-input-row {
    display: flex;
    border-top: 1px solid var(--border-color);
    background-color: var(--secondary-color);
}

.chatbot-input-row input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    outline: none;
    font-size: 13.5px;
}

.chatbot-input-row input:focus {
    background-color: #fafbfc;
}

/* ==========================================================================
   VIEW: MOCK RESULTS BOXES (PJe, Claude AI, Juris)
   ========================================================================== */
.pje-results-box {
    margin-top: 25px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    text-align: left;
    animation: slideUp 0.3s ease-out;
}

.pje-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.pje-results-header h4 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pje-history-list {
    list-style: none;
}

.pje-history-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12.5px;
}

.pje-history-list li:last-child {
    border-bottom: none;
}

.pje-date {
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 15px;
    display: inline-block;
    width: 80px;
}

.ai-chat-output-box {
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    padding: 18px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 350px;
    overflow-y: auto;
    line-height: 1.6;
    color: #1a1a1a;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-wrapper.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    padding: 35px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 400;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-close-modal:hover {
    color: var(--primary-color);
}

.modal-card form .form-group {
    margin-bottom: 20px;
}

.modal-card input, .modal-card select {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    outline: none;
    background-color: #fafbfc;
    transition: var(--transition);
}

.modal-card input:focus, .modal-card select:focus {
    border-color: var(--primary-color);
    background-color: var(--secondary-color);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 0px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
}

.modal-card .btn-primary {
    width: auto;
    padding: 10px 24px;
    font-size: 11px;
    border-radius: 0px;
}

/* ==========================================================================
   ANIMATIONS & RESPONSIVENESS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive Styles */
@media (max-width: 1120px) {
    .templates-layout, .calendar-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
        gap: 15px;
    }
    .kanban-column {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #1a1a1a;
    }
    
    .sidebar-brand {
        padding: 16px 20px;
        justify-content: space-between;
    }
    
    .sidebar-nav {
        padding: 10px;
    }
    
    .sidebar-group.active .group-items {
        max-height: 1000px;
    }

    .nav-link {
        padding: 8px 16px;
        font-size: 13px;
        border-left: none;
    }
    
    .nav-link.active {
        border-left: none;
        border-bottom: 2px solid var(--accent-color);
        background-color: transparent;
    }
    
    .nav-badge-fase {
        position: static;
        margin-left: 5px;
    }
    
    .sidebar-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
    }
    
    .btn-logout {
        padding: 6px 12px;
    }
    
    .content-area {
        height: auto;
    }
    
    .content-header {
        padding: 20px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
    
}

/* ==========================================================================
   NOVAS CLASSES DE INTEGRAÇÃO (CRM, FINANCEIRO E PROMPTS)
   ========================================================================== */
.btn-link-crm {
    background: none;
    border: none;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    text-align: left;
    font-size: 13.5px;
    transition: var(--transition);
}
.btn-link-crm:hover {
    color: var(--text-muted);
}

.badge-prompt-local {
    background-color: var(--light-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
}
.badge-prompt-claude {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
}
.badge-prompt-oab {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
}
.badge-prompt-mathrick {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
}

.btn-use-prompt {
    background-color: var(--dark-gray);
    color: var(--secondary-color);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border-color);
    cursor: pointer;
    border-radius: 0px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn-use-prompt:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.arrow-hover {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}
.quick-link-item:hover .arrow-hover {
    transform: translateX(4px);
    color: var(--primary-color);
}
