/* ═══ Mizpah — Glassmorphism Theme ═══
   Rise Partners navy + gold + cream palette
   Navy: #1B2A4A | Gold: #C5A235 | Cream: #F5E6C8 | Warm white: #FAF6F0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Base Reset ─── */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: linear-gradient(135deg, #FAF6F0 0%, #F0E8D8 50%, #E8DCC8 100%) !important;
    min-height: 100vh;
    color: #1B2A4A;
    margin: 0;
}

/* ─── Glass Effects ─── */
.glass {
    background: rgba(250, 246, 240, 0.75) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(197, 162, 53, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 30px rgba(27, 42, 74, 0.04);
}

.glass-dark {
    background: rgba(27, 42, 74, 0.04) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(27, 42, 74, 0.08) !important;
    border-radius: 12px !important;
}

.glass-card {
    background: rgba(250, 246, 240, 0.7) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(197, 162, 53, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(27, 42, 74, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(197, 162, 53, 0.12);
    border-color: rgba(197, 162, 53, 0.25) !important;
}

/* ─── Accent Color ─── */
.accent { color: #C5A235; font-weight: 600; }

/* ─── Portal Layout (Home + Chat) ─── */
.portal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    gap: 1.8rem;
}

.portal-logo h1 {
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0;
}

.portal-subtitle {
    color: #666;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 300;
    margin-top: 0.3rem;
}

/* ─── Search Bar (Glass) ─── */
.search-container {
    display: flex;
    align-items: center;
    width: min(640px, 90vw);
    padding: 1rem 1.5rem;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.search-container input[type="text"] {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    color: #1a1a2e;
    box-shadow: none !important;
}

.search-container input[type="text"]::placeholder {
    color: #999;
}

.search-icon { font-size: 1.2rem; opacity: 0.5; }

.send-btn {
    background: #C5A235;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.send-btn:hover { background: #B08E2A; }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── Dashboard Icons Grid ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    width: min(640px, 90vw);
}

.dashboard-icon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 0.8rem;
    text-decoration: none !important;
    color: #1B2A4A !important;
    cursor: pointer;
    text-align: center;
    gap: 0.5rem;
    min-height: 100px;
}

.dashboard-icon-card .icon-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.2rem;
}

.dashboard-icon-card .icon-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: #555;
    line-height: 1.2;
}

/* ─── Chat Layout ─── */
.chat-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.chat-sidebar {
    width: 260px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chat-sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
}

.chat-welcome {
    text-align: center;
    padding: 3rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.chat-welcome h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.chat-welcome p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.chat-welcome .hint {
    color: #999;
    font-size: 0.82rem;
    font-style: italic;
}

.msg-row {
    display: flex;
    gap: 1rem;
    padding: 0.8rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.msg-row.user { flex-direction: row-reverse; }

.msg-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.msg-bubble {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.02);
    padding: 1rem 1.2rem;
    border-radius: 12px;
}

.msg-row.user .msg-bubble {
    background: #1B2A4A;
    color: #FAF6F0;
    border-radius: 12px 12px 4px 12px;
}

.msg-typing {
    color: #888;
    font-style: italic;
}

.chat-input-area {
    padding: 0.5rem 2rem 1rem;
}

.chat-input-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.chat-input-container textarea,
.chat-input-container input[type="text"] {
    flex: 1;
    border: none !important;
    background: transparent !important;
    font-size: 0.95rem;
    outline: none;
    font-family: 'Inter', sans-serif;
    resize: none;
    line-height: 1.5;
    box-shadow: none !important;
}

.chat-disclaimer {
    text-align: center;
    color: #ccc;
    font-size: 0.7rem;
    margin-top: 0.3rem;
}

/* ─── Sidebar (Dashboard pages) ─── */
.sidebar-glass {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 16rem;
    padding: 2rem 1rem;
    background: rgba(27, 42, 74, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #E8DCC8;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.dashboard-content {
    margin-left: 17rem;
    margin-right: 1rem;
    padding: 1rem;
}

/* ─── KPI Cards Glass Override ─── */
.kpi-glass {
    background: rgba(250, 246, 240, 0.7) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(197, 162, 53, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 24px rgba(27, 42, 74, 0.04) !important;
}

/* ─── DataTable Glass ─── */
.dash-table-container {
    border-radius: 12px;
    overflow: hidden;
}

/* ─── Utilities ─── */
.text-muted-glass { color: #888 !important; }
.disclaimer { color: #bbb; font-size: 0.75rem; max-width: 500px; text-align: center; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar-glass { display: none; }
    .dashboard-content { margin-left: 0; }
    .portal-logo h1 { font-size: 2.5rem; }
    .dashboard-grid { grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
    .chat-sidebar { display: none; }
    .chat-messages { padding: 1rem; }
    .chat-input-area { padding: 0.5rem 1rem 1rem; }
}
