/* ============================================================
   Elysian Hideaway — Customer Portal Styles
   ============================================================ */

:root {
    --portal-primary: #006D77;
    --portal-primary-rgb: 0, 109, 119;
    --portal-primary-dark: #005a63;
    --portal-primary-light: #e0f4f4;
    --portal-accent: #83c5be;
    --portal-accent-rgb: 131, 197, 190;
    --portal-dark: #1a1a2e;
    --portal-dark-rgb: 26, 26, 46;
    --portal-light: #f8f9fa;
    --portal-white: #ffffff;
    --portal-text: #333333;
    --portal-text-muted: #6c757d;
    --portal-border: #e0e0e0;
    --portal-success: #198754;
    --portal-danger: #dc3545;
    --portal-warning: #fd7e14;
    --portal-info: #0dcaf0;
    --portal-sidebar-width: 260px;
    --portal-topbar-height: 60px;
    --portal-radius: 12px;
    --portal-radius-sm: 8px;
    --portal-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --portal-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --portal-shadow-hover: 0 8px 25px rgba(0, 109, 119, 0.15);
    --portal-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--portal-light);
    color: var(--portal-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--portal-primary-dark);
}

/* ============================================================
   Top Navigation Bar
   ============================================================ */
.portal-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--portal-topbar-height);
    background: var(--portal-white);
    border-bottom: 1px solid var(--portal-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: 1040;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--portal-primary);
    text-decoration: none;
}

.topbar-brand:hover {
    color: var(--portal-primary-dark);
}

.topbar-brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

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

.topbar-section-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--portal-text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--portal-text);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--portal-radius-sm);
    transition: var(--portal-transition);
}

.sidebar-toggle-btn:hover {
    background: var(--portal-light);
    color: var(--portal-primary);
}

/* Notification Bell */
.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--portal-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--portal-transition);
    line-height: 1;
}

.topbar-icon-btn::after {
    display: none;
}

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

.notification-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--portal-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    border: 2px solid var(--portal-white);
}

.notifications-dropdown {
    width: 340px;
    max-height: 420px;
    padding: 0;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow-lg);
    overflow: hidden;
}

.notifications-dropdown .dropdown-header {
    padding: 0.75rem 1rem;
    background: var(--portal-light);
    border-bottom: 1px solid var(--portal-border);
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notifications-list .notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    transition: var(--portal-transition);
}

.notifications-list .notification-item:hover {
    background: var(--portal-primary-light);
}

.notifications-list .notification-item:last-child {
    border-bottom: none;
}

.notifications-dropdown .dropdown-footer {
    padding: 0.6rem;
    border-top: 1px solid var(--portal-border);
    background: var(--portal-light);
}

/* User Dropdown */
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--portal-border);
    border-radius: 50px;
    padding: 0.3rem 0.75rem 0.3rem 0.3rem;
    cursor: pointer;
    transition: var(--portal-transition);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--portal-text);
}

.topbar-user-btn::after {
    font-size: 0.6rem;
    margin-left: 0.25rem;
}

.topbar-user-btn:hover {
    border-color: var(--portal-primary);
    background: var(--portal-primary-light);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.user-name {
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   Sidebar
   ============================================================ */
.portal-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--portal-topbar-height);
}

.portal-sidebar {
    position: fixed;
    top: var(--portal-topbar-height);
    left: 0;
    bottom: 0;
    width: var(--portal-sidebar-width);
    background: var(--portal-dark);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-sidebar::-webkit-scrollbar {
    width: 4px;
}

.portal-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

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

.sidebar-brand-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--portal-transition);
}

.sidebar-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.875rem;
    font-weight: 450;
    text-decoration: none;
    transition: var(--portal-transition);
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-left-color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav-item.active {
    color: #fff;
    background: rgba(var(--portal-primary-rgb), 0.35);
    border-left-color: var(--portal-accent);
    font-weight: 500;
}

.sidebar-nav-item i {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--portal-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    padding: 0 6px;
}

/* Sidebar Footer (User Info) */
.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-details {
    overflow: hidden;
}

.sidebar-user-name {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1025;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================================
   Main Content
   ============================================================ */
.portal-main {
    flex: 1;
    margin-left: var(--portal-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.portal-content {
    padding: 1.5rem;
    flex: 1;
}

/* Page header */
.portal-page-header {
    margin-bottom: 1.5rem;
}

.portal-page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--portal-text);
    margin: 0 0 0.25rem;
}

.portal-page-header p {
    color: var(--portal-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
   Cards
   ============================================================ */
.portal-card {
    background: var(--portal-white);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    border: 1px solid var(--portal-border);
    padding: 1.5rem;
    transition: var(--portal-transition);
}

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

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

.portal-card-header h2,
.portal-card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: var(--portal-text);
}

.portal-card-static {
    background: var(--portal-white);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    border: 1px solid var(--portal-border);
    padding: 1.5rem;
}

/* ============================================================
   Stat Cards (Dashboard)
   ============================================================ */
.stat-card {
    background: var(--portal-white);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    border: 1px solid var(--portal-border);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--portal-transition);
}

.stat-card:hover {
    box-shadow: var(--portal-shadow-hover);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--portal-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-icon.primary {
    background: rgba(var(--portal-primary-rgb), 0.12);
    color: var(--portal-primary);
}

.stat-card-icon.accent {
    background: rgba(var(--portal-accent-rgb), 0.2);
    color: var(--portal-primary);
}

.stat-card-icon.success {
    background: rgba(25, 135, 84, 0.12);
    color: var(--portal-success);
}

.stat-card-icon.warning {
    background: rgba(253, 126, 20, 0.12);
    color: var(--portal-warning);
}

.stat-card-icon.danger {
    background: rgba(220, 53, 69, 0.12);
    color: var(--portal-danger);
}

.stat-card-icon.info {
    background: rgba(13, 202, 240, 0.12);
    color: var(--portal-info);
}

.stat-card-body {
    flex: 1;
    min-width: 0;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--portal-text);
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--portal-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================================
   Tables
   ============================================================ */
.portal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.portal-table thead th {
    background: var(--portal-light);
    color: var(--portal-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--portal-border);
    white-space: nowrap;
}

.portal-table tbody tr {
    transition: var(--portal-transition);
}

.portal-table tbody tr:nth-child(even) {
    background: rgba(var(--portal-primary-rgb), 0.02);
}

.portal-table tbody tr:hover {
    background: var(--portal-primary-light);
}

.portal-table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.portal-table .table-actions {
    white-space: nowrap;
}

.portal-table .table-actions a,
.portal-table .table-actions button {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* ============================================================
   Status Badges
   ============================================================ */
.badge-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35em 0.75em;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-confirmed,
.badge-active {
    background: rgba(25, 135, 84, 0.12);
    color: var(--portal-success);
}

.badge-pending {
    background: rgba(253, 126, 20, 0.12);
    color: var(--portal-warning);
}

.badge-cancelled,
.badge-inactive {
    background: rgba(220, 53, 69, 0.1);
    color: var(--portal-danger);
}

.badge-checked-in {
    background: rgba(var(--portal-primary-rgb), 0.12);
    color: var(--portal-primary);
}

.badge-checked-out {
    background: rgba(108, 117, 125, 0.12);
    color: var(--portal-text-muted);
}

.badge-completed {
    background: rgba(25, 135, 84, 0.12);
    color: var(--portal-success);
}

.badge-no-show {
    background: rgba(220, 53, 69, 0.08);
    color: #b02a37;
}

/* ============================================================
   Forms
   ============================================================ */
.portal-form .form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--portal-text);
    margin-bottom: 0.35rem;
}

.portal-form .form-control,
.portal-form .form-select {
    border: 1.5px solid var(--portal-border);
    border-radius: var(--portal-radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    transition: var(--portal-transition);
    color: var(--portal-text);
    background-color: var(--portal-white);
}

.portal-form .form-control:focus,
.portal-form .form-select:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(var(--portal-primary-rgb), 0.15);
    outline: none;
}

.portal-form .form-control::placeholder {
    color: #adb5bd;
}

.portal-form .form-text {
    font-size: 0.78rem;
    color: var(--portal-text-muted);
}

.portal-form .invalid-feedback {
    font-size: 0.78rem;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-portal {
    background: var(--portal-primary);
    color: #fff;
    border: none;
    border-radius: var(--portal-radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--portal-transition);
    cursor: pointer;
}

.btn-portal:hover {
    background: var(--portal-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--portal-primary-rgb), 0.3);
}

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

.btn-portal-outline {
    background: transparent;
    color: var(--portal-primary);
    border: 1.5px solid var(--portal-primary);
    border-radius: var(--portal-radius-sm);
    padding: 0.55rem 1.2rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--portal-transition);
    cursor: pointer;
}

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

.btn-portal-accent {
    background: var(--portal-accent);
    color: var(--portal-dark);
    border: none;
    border-radius: var(--portal-radius-sm);
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--portal-transition);
    cursor: pointer;
}

.btn-portal-accent:hover {
    background: #6fb8b0;
    color: var(--portal-dark);
    transform: translateY(-1px);
}

/* ============================================================
   Chat
   ============================================================ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--portal-topbar-height) - 200px);
    min-height: 400px;
    background: var(--portal-white);
    border-radius: var(--portal-radius);
    border: 1px solid var(--portal-border);
    overflow: hidden;
}

.chat-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--portal-border);
    background: var(--portal-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
    word-break: break-word;
}

.chat-message .chat-time {
    font-size: 0.68rem;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 0.35rem;
    display: block;
}

.chat-message.sent {
    align-self: flex-end;
    background: var(--portal-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message.sent .chat-time {
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.chat-message.received {
    align-self: flex-start;
    background: var(--portal-light);
    color: var(--portal-text);
    border-bottom-left-radius: 4px;
}

.chat-message.received .chat-time {
    color: var(--portal-text-muted);
}

.chat-message.system-msg {
    align-self: center;
    max-width: 90%;
    background: transparent;
    color: var(--portal-text-muted);
    font-size: 0.78rem;
    text-align: center;
    padding: 0.5rem;
}

.chat-date-separator {
    text-align: center;
    font-size: 0.72rem;
    color: var(--portal-text-muted);
    padding: 0.5rem 0;
    position: relative;
}

.chat-date-separator::before,
.chat-date-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--portal-border);
}

.chat-date-separator::before {
    left: 0;
}

.chat-date-separator::after {
    right: 0;
}

.chat-input {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--portal-border);
    background: var(--portal-white);
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.chat-input textarea {
    flex: 1;
    border: 1.5px solid var(--portal-border);
    border-radius: 20px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.4;
    transition: var(--portal-transition);
}

.chat-input textarea:focus {
    border-color: var(--portal-primary);
    box-shadow: 0 0 0 3px rgba(var(--portal-primary-rgb), 0.12);
    outline: none;
}

.chat-input .chat-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--portal-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: var(--portal-transition);
}

.chat-input .chat-send-btn:hover {
    background: var(--portal-primary-dark);
    transform: scale(1.05);
}

.chat-input .chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    color: var(--portal-text-muted);
}

.chat-typing-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--portal-text-muted);
    animation: chatTyping 1.4s infinite;
}

.chat-typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatTyping {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-4px); }
}

/* ============================================================
   Portal Footer
   ============================================================ */
.portal-footer {
    border-top: 1px solid var(--portal-border);
    background: var(--portal-white);
    padding: 1rem 1.5rem;
    margin-left: var(--portal-sidebar-width);
}

.portal-footer .footer-content {
    text-align: center;
}

.portal-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--portal-text-muted);
}

/* ============================================================
   Public Layout (Login / Register Pages)
   Same hero video treatment as main site index.php (video/reel.mp4 + overlay)
   ============================================================ */
.portal-public-layout {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: hidden;
    /* Fallback when video unavailable or reduced-motion */
    background: linear-gradient(135deg, var(--portal-dark) 0%, #16213e 50%, var(--portal-primary-dark) 100%);
}

.portal-public-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.portal-public-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portal-public-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
    .portal-public-video-bg {
        display: none;
    }
}

.portal-public-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--portal-white);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow-lg);
    padding: 2.5rem;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card .auth-logo-img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0.35rem;
}

.auth-card .auth-logo h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0.5rem 0 0.25rem;
    color: var(--portal-text);
}

.auth-card .auth-logo p {
    color: var(--portal-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================================
   Alerts
   ============================================================ */
.portal-alert {
    border-radius: var(--portal-radius-sm);
    border: none;
    font-size: 0.875rem;
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.portal-alert i {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.portal-alert.alert-success {
    background: rgba(25, 135, 84, 0.1);
    color: #0f5132;
}

.portal-alert.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #842029;
}

.portal-alert.alert-warning {
    background: rgba(253, 126, 20, 0.1);
    color: #664d03;
}

.portal-alert.alert-info {
    background: rgba(13, 202, 240, 0.1);
    color: #055160;
}

/* ============================================================
   Empty States
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--portal-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--portal-text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    max-width: 380px;
    margin: 0 auto;
}

/* ============================================================
   Loading Spinner
   ============================================================ */
.portal-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--portal-text-muted);
    font-size: 0.875rem;
}

.portal-spinner::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid var(--portal-border);
    border-top-color: var(--portal-primary);
    border-radius: 50%;
    animation: portalSpin 0.6s linear infinite;
}

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

/* ============================================================
   Toasts
   ============================================================ */
.portal-toast {
    border-radius: var(--portal-radius-sm);
    border: none;
    box-shadow: var(--portal-shadow-lg);
    font-size: 0.85rem;
}

.portal-toast .toast-body {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
}

.portal-toast.toast-success {
    background: var(--portal-success);
    color: #fff;
}

.portal-toast.toast-danger {
    background: var(--portal-danger);
    color: #fff;
}

.portal-toast.toast-warning {
    background: var(--portal-warning);
    color: #fff;
}

.portal-toast.toast-info {
    background: var(--portal-primary);
    color: #fff;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes portalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.portal-fade-in {
    animation: portalFadeIn 0.35s ease-out;
}

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

.portal-slide-in {
    animation: portalSlideIn 0.3s ease-out;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
    .portal-sidebar {
        transform: translateX(-100%);
    }

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

    .portal-main {
        margin-left: 0;
    }

    .portal-footer {
        margin-left: 0;
    }

    .portal-content {
        padding: 1rem;
    }

    .chat-container {
        height: calc(100vh - var(--portal-topbar-height) - 160px);
    }

    .chat-message {
        max-width: 85%;
    }

    .notifications-dropdown {
        width: 300px;
    }
}

@media (max-width: 767.98px) {
    .portal-content {
        padding: 0.75rem;
    }

    .portal-card {
        padding: 1rem;
        border-radius: var(--portal-radius-sm);
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card-value {
        font-size: 1.3rem;
    }

    .portal-table {
        font-size: 0.8rem;
    }

    .portal-table thead th,
    .portal-table tbody td {
        padding: 0.5rem 0.65rem;
    }

    .auth-card {
        padding: 1.75rem 1.5rem;
    }

    .chat-input textarea {
        font-size: 16px; /* prevents iOS zoom */
    }
}

@media (max-width: 575.98px) {
    .topbar-brand .brand-name {
        display: none;
    }

    .notifications-dropdown {
        width: calc(100vw - 2rem);
        max-width: 340px;
    }

    .portal-page-header h1 {
        font-size: 1.25rem;
    }

    .chat-message {
        max-width: 92%;
    }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
    .portal-topbar,
    .portal-sidebar,
    .sidebar-overlay,
    .portal-footer,
    .sidebar-toggle-btn {
        display: none !important;
    }

    .portal-main {
        margin-left: 0 !important;
    }

    .portal-content {
        padding: 0 !important;
    }

    .portal-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
}
