:root {
    --metallic-silver: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    --dark-steel: #3c4a5c; /* ADIUM Dark Slate Blue */
    --deep-space: #f8fafc;
    --accent-red: #E3000F; /* ADIUM Primary Red */
    --accent-red-hover: #b3000c;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --border-glow: rgba(227, 0, 15, 0.15);
    --text-main: #2d3748;
    --text-muted: #718096;
    --active-red: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { 
    background: var(--deep-space); 
    color: var(--text-main); 
    height: 100vh; 
    display: flex; 
    flex-direction: column;
    overflow: hidden;
}

/* Login Overlay */
#login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; transition: 0.5s;
}
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glow);
    border-top: 5px solid var(--accent-red);
    padding: 60px 45px; border-radius: 12px; width: 500px;
    box-shadow: 0 25px 50px -12px rgba(227, 0, 15, 0.12);
    text-align: center;
}
.login-card h2 { font-family: 'Orbitron', sans-serif; margin-bottom: 20px; color: var(--accent-red); font-size: 1.5rem; }
.login-card input {
    width: 100%; padding: 14px; margin-bottom: 20px; border-radius: 8px;
    border: 1px solid #cbd5e1; background: #ffffff; color: var(--text-main); text-align: center; font-size: 1rem;
    outline: none; transition: 0.3s;
}
.login-card input:focus { border-color: var(--accent-red); box-shadow: 0 0 8px rgba(211, 47, 47, 0.2); }

/* Tabs styling */
.login-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #cbd5e1;
}
.login-tab {
    flex: 1;
    padding: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    text-transform: uppercase;
}
.login-tab.active {
    color: var(--accent-red);
    border-bottom: 3px solid var(--accent-red);
}
.login-form-group {
    display: none;
}
.login-form-group.active {
    display: block;
}

/* Layout */
header {
    padding: 10px 25px; background: #ffffff; border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
    height: 60px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.logo { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--accent-red); }
.tech-badge { font-size: 0.6rem; color: #fff; background: var(--accent-red); padding: 4px 10px; border-radius: 12px; font-weight: 600; }

.main-container { 
    display: grid; 
    grid-template-columns: 280px 240px 1fr; 
    flex: 1; 
    overflow: hidden; 
}

/* Column 2: List Column */
.list-column {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 240px;
}
.list-column-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}
.list-column-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.list-column-content::-webkit-scrollbar {
    width: 6px;
}
.list-column-content::-webkit-scrollbar-track {
    background: transparent;
}
.list-column-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
.list-column-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.list-item-session, .list-item-rep {
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    text-transform: uppercase;
}
.list-item-session:hover, .list-item-rep:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.list-item-session.active, .list-item-rep.active {
    background: rgba(227, 0, 15, 0.06);
    border-color: rgba(227, 0, 15, 0.25);
    color: var(--accent-red);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--accent-red), 0 4px 6px -1px rgba(227, 0, 15, 0.05);
}

/* Sidebar */
.sidebar {
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}
.sidebar-section {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}
.section-label { font-family: 'Orbitron', sans-serif; font-size: 0.7rem; color: var(--accent-red); margin-bottom: 12px; letter-spacing: 1px; font-weight: 700; }

/* Buttons */
.btn-pro {
    width: 100%; padding: 12px; border-radius: 8px; border: none;
    font-weight: 700; cursor: pointer; transition: 0.2s; margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 1px; font-size: 0.7rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-red { background: var(--accent-red); color: white; box-shadow: 0 4px 0 var(--accent-red-hover); }
.btn-red:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--accent-red-hover); }
.btn-red:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--accent-red-hover); }

.btn-active-green {
    background: #10b981 !important;
    color: white !important;
    box-shadow: 0 4px 0 #059669 !important;
}
.btn-active-green:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #059669 !important;
}
.btn-active-green:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #059669 !important;
}

.btn-silver { background: #f1f5f9; color: var(--text-main); border: 1px solid #cbd5e1; }
.btn-silver:hover { background: #e2e8f0; }

.btn-recording { background: var(--active-red) !important; color: white !important; box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important; animation: pulse-border 2s infinite; }
.btn-dark { background: #1e293b; color: #fff; }
.btn-dark:hover { background: #334155; }

.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; display: none; }
.btn-recording .rec-dot { display: block; animation: blink 1s infinite; }

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Chat Area */
.chat-container { display: flex; flex-direction: column; flex: 1; background: #f8fafc; position: relative; overflow: hidden; }
.chat-container::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background-image: url('https://adium.com.br/wp-content/uploads/sites/3/2023/03/cropped-isologo-1-192x192.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.chat-header-info { 
    padding: 15px 30px; background: #ffffff; border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0; box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    z-index: 1;
}
.info-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.info-value { font-size: 0.95rem; font-weight: 700; color: var(--accent-red); }

.chat-box { flex: 1; overflow-y: auto; padding: 30px; display: flex; flex-direction: column; gap: 20px; z-index: 1; }
.bubble { padding: 20px; border-radius: 18px; max-width: 80%; font-size: 0.95rem; line-height: 1.6; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.bubble-dr { background: #ffffff; align-self: flex-start; border: 1px solid #e2e8f0; color: var(--text-main); }
.bubble-user { background: var(--accent-red); color: #ffffff; align-self: flex-end; }
.bubble-laudo { background: #ffffff; color: var(--text-main); max-width: 90%; align-self: center; padding: 30px; border-left: 10px solid var(--accent-red); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Styling for Transcript-based Laudo / Report */
.laudo-interacao {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e2e8f0;
}
.laudo-dra {
    border: 1px solid rgba(227, 0, 15, 0.3);
    background: rgba(227, 0, 15, 0.01);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: var(--text-main);
}
.laudo-rep {
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(59, 130, 246, 0.02);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: var(--text-main);
}
.laudo-analise {
    border: 1px solid rgba(16, 185, 129, 0.25);
    background: rgba(16, 185, 129, 0.02);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
}
.laudo-num-interacao {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--accent-red);
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
}


/* Chat Welcome Panel */
.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    text-align: center;
    padding: 30px 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(227, 0, 15, 0.15);
    max-width: 480px;
    animation: fadeIn 0.5s ease-out;
    z-index: 10;
}
.welcome-logo-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 6px 15px rgba(227, 0, 15, 0.08);
    border: 2px solid rgba(227, 0, 15, 0.15);
}
.welcome-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}
.welcome-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: var(--accent-red);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 5px;
}
.welcome-subtitle {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
.welcome-divider {
    width: 50px;
    height: 3px;
    background: var(--accent-red);
    margin: 15px 0;
    border-radius: 2px;
}
.welcome-instruction {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.6;
}

/* Status */
.status-pill { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #f1f5f9; border-radius: 50px; font-size: 0.7rem; border: 1px solid #cbd5e1; color: var(--text-main); font-weight: 600;}
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.pulse-dot.active { background: #ef4444; animation: blink 1s infinite; }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.2; } 100% { opacity: 1; } }

/* Responsive - Only for phones */
@media (max-width: 600px) {
    .main-container { grid-template-columns: 1fr; height: calc(100vh - 60px); }
    .sidebar { 
        position: absolute; left: -280px; top: 0; bottom: 0; width: 280px; z-index: 1000; 
        background: #ffffff; transition: 0.3s; box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    }
    .sidebar.active { left: 0; }
    .chat-container { width: 100%; }
    .menu-toggle { display: block !important; cursor: pointer; color: var(--accent-red); font-size: 1.5rem; }
}
.menu-toggle { display: none; }
/* Camera Preview */
#camera-container {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 240px;
    height: 180px;
    background: #000;
    border: 3px solid var(--accent-red);
    border-radius: 12px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
#camera-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}
.camera-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Manager Layout CSS */
.manager-layout {
    display: grid;
    grid-template-columns: 260px 1fr 380px;
    flex: 1;
    overflow: hidden;
    background: var(--deep-space);
}
.manager-sidebar {
    background: #ffffff;
    border-right: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.manager-sidebar-top {
    padding: 15px;
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.manager-sidebar-bottom {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.manager-center {
    background: #e2e8f0; /* slightly darker background to make white sheet pop */
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.laudo-paper {
    background: #ffffff;
    width: 100%;
    max-width: 800px;
    min-height: 842px; /* letter/A4 style height */
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 4px;
    border-top: 8px solid var(--accent-red);
    position: relative;
    box-sizing: border-box;
    color: var(--text-main);
    text-align: left;
}
.manager-right {
    background: #ffffff;
    border-left: 1px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 380px;
}

/* Specialty Select styling */
.specialty-container {
    display: flex;
    flex-direction: column;
}

.select-specialty {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    background: #f8fafc !important;
    color: var(--text-main) !important;
    border: 1px solid #cbd5e1 !important;
    outline: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.select-specialty:focus {
    border-color: var(--accent-red) !important;
    box-shadow: 0 0 0 2px rgba(227, 0, 15, 0.1) !important;
}

.active-specialty-badge {
    font-weight: 800 !important;
    color: #ffffff !important;
    background: var(--accent-red) !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    display: inline-block !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 0 12px rgba(227, 0, 15, 0.3) !important;
    text-transform: uppercase !important;
    border: 1px solid rgba(227, 0, 15, 0.4) !important;
    margin-top: 4px !important;
    text-decoration: underline !important;
    text-underline-offset: 4px !important;
    text-decoration-thickness: 2px !important;
}


