/* =========================================================
   ConnectChat LAN - Glassmorphism Theme & UI Stylesheet
   ========================================================= */

:root {
  --bg-gradient: radial-gradient(circle at 50% 0%, #1c2630 0%, #121921 70%, #0c1116 100%);
  --panel-bg: rgba(25, 34, 43, 0.85);
  --panel-border: rgba(255, 255, 255, 0.08);
  --glass-glow: 0 10px 30px 0 rgba(0, 0, 0, 0.35);
  --accent-primary: #14b8a6;
  --accent-gold: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #2563eb 100%);
  --accent-hover: #0f766e;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --bubble-self: linear-gradient(135deg, #0f766e 0%, #1e40af 100%);
  --bubble-other: rgba(30, 41, 51, 0.92);
  --word-color: #2b579a;
  --excel-color: #217346;
  --powerpoint-color: #b7472a;
  --pdf-color: #e23535;
  --generic-doc-color: #64748b;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow: hidden;
}

/* Gold Gradient Utilities & Logos */
.gold-gradient-text {
  background: var(--accent-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800 !important;
}

.header-title-gold {
  font-size: 19px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.app-logo-badge {
  width: 90px;
  height: 90px;
  margin: 0 auto 10px;
  border-radius: 50%;
  padding: 2px;
  background: var(--accent-gold);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.logo-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  padding: 2px;
  background: var(--accent-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.banner-logo-wrap {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-gold);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

.banner-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.luxury-glow {
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.15) !important;
}

.luxury-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

.btn-gold {
  background: var(--accent-gold) !important;
  color: #0f172a !important;
  font-weight: 800 !important;
}

.btn-gold:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
}

/* In-Page Header Direct Login Bar (تسجيل الدخول من داخل الصفحة) */
.header-identity-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 15px;
}

.inline-login-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-login-form input {
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f8fafc;
  width: 230px;
  transition: all 0.2s ease;
}

.inline-login-form input:focus {
  border-color: #fbbf24;
  outline: none;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.btn-sm {
  padding: 6px 14px !important;
  font-size: 12.5px !important;
  border-radius: var(--radius-sm) !important;
}

.header-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 5px 12px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
}

.user-details-sm {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.user-name-text {
  font-size: 12.5px;
  font-weight: 800;
  color: #fbbf24;
}

.user-role-text {
  font-size: 9.5px;
  color: #cbd5e1;
  font-weight: 700;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.glass-card {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--panel-border);
  box-shadow: var(--glass-glow);
  backdrop-filter: blur(16px);
  border-radius: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 20px 22px;
  text-align: center;
}

.app-icon-badge {
  width: 55px;
  height: 55px;
  margin: 0 auto 10px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.login-header h2 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 2px;
  color: #ffffff;
}

.sub-header-title {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 4px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 15px;
  color: var(--text-muted);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--panel-border);
}

.divider span {
  padding: 0 10px;
}

.google-btn-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
}

.form-group {
  text-align: right;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--radius-md) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  resize: vertical;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
  background: rgba(30, 41, 59, 0.95) !important;
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
  color: #64748b !important;
}

/* File Input Custom Dark Styling */
.form-group input[type="file"] {
  width: 100%;
  padding: 10px 14px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: #94a3b8;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.form-group input[type="file"]:hover {
  border-color: var(--accent-primary);
}

.form-group input[type="file"]::file-selector-button {
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  margin-left: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.form-group input[type="file"]::file-selector-button:hover {
  filter: brightness(1.15);
}

.color-picker-grid {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 5px;
}

.color-opt input {
  display: none;
}

.color-opt span {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}

.color-opt input:checked + span {
  transform: scale(1.2);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

/* Header */
.glass-header {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--panel-border);
  min-height: 65px;
  height: 65px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.header-brand > div {
  min-width: 0;
  overflow: hidden;
}

.logo-circle {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  flex-shrink: 0;
}

.header-brand h1 {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.status-tag {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-dot {
  font-size: 8px;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 10px;
}

.ip-info-pill {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
}

.ip-info-pill i {
  color: var(--accent-primary);
}

/* Main Body Layout */
.main-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.glass-sidebar {
  width: 300px;
  background: rgba(15, 23, 42, 0.6);
  border-left: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--panel-border);
}

.sidebar-header h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  background: var(--accent-primary);
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.users-list {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}

.user-item:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.3);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-private-chat {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-private-chat:hover {
  background: var(--accent-primary);
  color: #fff;
}

.unread-badge {
  background: #f43f5e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 4px;
}

/* Chat Channel Header Bar */
.chat-channel-bar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.channel-icon {
  color: var(--accent-primary);
  font-size: 16px;
}

/* Private Message Bubble Styling */
.msg-bubble.private {
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(30, 41, 59, 0.9) 100%) !important;
}

.private-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.lan-card {
  margin: 15px;
  padding: 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #93c5fd;
  line-height: 1.5;
}

.lan-card-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: #bfdbfe;
}

/* Chat Section */
.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: rgba(15, 23, 42, 0.4);
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.welcome-banner {
  text-align: center;
  padding: 30px 20px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
}

.welcome-icon {
  font-size: 38px;
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.welcome-banner h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.welcome-banner p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 500px;
  margin: 0 auto;
}

/* Message Bubble */
.message-row {
  display: flex;
  gap: 12px;
  max-width: 80%;
  animation: slideUp 0.25s ease-out;
}

.message-row.self {
  margin-right: auto;
  flex-direction: row-reverse;
}

.message-row.other {
  margin-left: auto;
}

.msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.msg-content-wrap {
  display: flex;
  flex-direction: column;
}

.msg-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  gap: 8px;
}

.message-row.self .msg-meta {
  justify-content: flex-end;
}

.msg-sender-name {
  font-weight: 600;
  color: #cbd5e1;
}

.msg-bubble {
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.message-row {
  position: relative;
}

.msg-bubble-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.message-row.self .msg-bubble-wrap {
  flex-direction: row-reverse;
}

.msg-menu-trigger {
  opacity: 0;
  visibility: hidden;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.message-row:hover .msg-menu-trigger {
  opacity: 1;
  visibility: visible;
}

.msg-menu-trigger:hover {
  background: var(--panel-border);
  color: #fff;
}

.msg-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  padding: 6px;
  min-width: 170px;
  animation: fadeIn 0.15s ease-out;
}

.message-row.self .msg-dropdown-menu {
  left: 0;
}

.message-row.other .msg-dropdown-menu {
  right: 0;
}

.msg-dropdown-menu.active {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-menu-item {
  background: transparent;
  border: none;
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
  width: 100%;
}

.msg-menu-item:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.msg-menu-item.danger:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
}

/* Media & Document Attachments */
.media-container {
  margin-top: 8px;
}

.media-image {
  max-width: 320px;
  max-height: 280px;
  border-radius: var(--radius-md);
  cursor: pointer;
  object-fit: cover;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-image:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.media-video-wrap {
  max-width: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #000;
}

.media-video {
  width: 100%;
  max-height: 300px;
  display: block;
}

.video-footer-bar {
  background: rgba(15, 23, 42, 0.9);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #cbd5e1;
}

/* Document & Office Cards */
.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-width: 260px;
  max-width: 380px;
  margin-top: 6px;
}

.doc-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.doc-icon-badge.word { background: var(--word-color); }
.doc-icon-badge.excel { background: var(--excel-color); }
.doc-icon-badge.powerpoint { background: var(--powerpoint-color); }
.doc-icon-badge.pdf { background: var(--pdf-color); }
.doc-icon-badge.generic { background: var(--generic-doc-color); }

.doc-details {
  flex: 1;
  overflow: hidden;
}

.doc-name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f8fafc;
}

.doc-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-download {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-download:hover {
  background: var(--accent-primary);
  transform: scale(1.1);
}

/* Audio Player */
.audio-player-wrap {
  margin-top: 6px;
}

.audio-player-wrap audio {
  max-width: 280px;
  height: 38px;
}

/* Typing Indicator */
.typing-indicator {
  padding: 8px 25px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }

/* File Preview Bar (قبل الإرسال) */
.file-preview-bar {
  background: rgba(30, 41, 59, 0.95);
  border-top: 1px solid var(--panel-border);
  padding: 10px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-info i {
  font-size: 24px;
  color: var(--accent-primary);
}

.preview-details {
  display: flex;
  flex-direction: column;
}

#previewName {
  font-size: 13px;
  font-weight: 600;
}

.preview-size {
  font-size: 11px;
  color: var(--text-muted);
}

/* Drag & Drop Overlay */
.drag-drop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border: 3px dashed var(--accent-primary);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--radius-lg);
  pointer-events: none;
  animation: fadeIn 0.2s ease;
}

.drag-drop-overlay i {
  font-size: 54px;
  color: var(--accent-primary);
  margin-bottom: 12px;
  animation: pulse 1.5s infinite;
}

.drag-drop-overlay h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.drag-drop-overlay p {
  color: var(--text-muted);
  font-size: 14px;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary-sm {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary-sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.progress-wrap {
  flex: 1;
  position: relative;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  transition: width 0.1s linear;
}

/* Voice Recorder Bar */
.voice-recorder-bar {
  background: rgba(225, 29, 72, 0.15);
  border-top: 1px solid rgba(225, 29, 72, 0.4);
  padding: 12px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recording-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #f43f5e;
  font-weight: 600;
}

.recording-dot {
  width: 10px;
  height: 10px;
  background: #f43f5e;
  border-radius: 50%;
  animation: pulse 1s infinite;
}

.recorder-actions {
  display: flex;
  gap: 10px;
}

/* Input Toolbar */
.glass-input {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--panel-border);
  padding: 14px 25px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#messageInput {
  flex: 1;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 10px 18px;
  color: #fff;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 100px;
}

#messageInput:focus {
  border-color: var(--accent-primary);
}

/* Buttons */
.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--panel-border);
  color: #cbd5e1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(51, 65, 85, 1);
  color: #fff;
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.25) !important;
  color: #f43f5e !important;
  border-color: rgba(244, 63, 94, 0.5) !important;
}

.btn-send {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
}

.btn-attach:hover {
  color: #3b82f6;
  border-color: #3b82f6;
}

.btn-mic:hover {
  color: #f43f5e;
  border-color: #f43f5e;
}

.btn-cancel-sm {
  background: rgba(244, 63, 94, 0.2);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
}

.btn-success-sm {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
}

/* Lightbox */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  left: 0;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
}

.lightbox-footer {
  margin-top: 15px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Navigation Tabs for Sections */
.app-main-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--panel-border);
  padding: 4px 15px;
  gap: 8px;
  overflow-x: auto;
}

.nav-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  position: relative;
}

/* Red Section Icons */
.nav-tab i {
  color: #f43f5e !important;
  font-size: 16.5px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease, color 0.25s ease;
  filter: drop-shadow(0 2px 5px rgba(244, 63, 94, 0.4));
}

/* Crisp Clean Text (Without Blurry Shadows) */
.nav-tab span {
  text-shadow: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Movement & Animation on Hover */
.nav-tab:hover {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.12);
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25), 0 0 12px rgba(244, 63, 94, 0.2);
}

.nav-tab:hover i {
  color: #ff2a4b !important;
  transform: scale(1.35) rotate(-8deg);
  filter: drop-shadow(0 4px 10px rgba(255, 42, 75, 0.6));
  animation: tabIconBounce 0.8s ease-in-out infinite alternate;
}

/* Active Tab Styling */
.nav-tab.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

.nav-tab.active i {
  color: #ffffff !important;
  transform: scale(1.2);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.nav-tab.active span {
  color: #ffffff !important;
  font-weight: 800;
}

@keyframes tabIconBounce {
  0% {
    transform: scale(1.35) rotate(-8deg);
  }
  100% {
    transform: scale(1.48) rotate(5deg) translateY(-2px);
  }
}

/* Content Sections */
.content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: rgba(15, 23, 42, 0.4);
  overflow-y: auto;
  padding: 20px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i, .gold-icon {
  color: #f43f5e !important;
  font-size: 24px;
  filter: drop-shadow(0 2px 6px rgba(244, 63, 94, 0.4));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.section-title:hover i, .gold-icon:hover {
  transform: scale(1.25) rotate(-8deg);
}

.section-title h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  text-shadow: none !important;
}

/* Grids */
.section-grid,
.blood-years-list-wrap,
.national-memory-list-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.blood-year-card .card-media-wrap {
  max-height: 160px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.blood-year-card .card-media-wrap video {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
}

/* Section Cards */
.section-card {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
}

.section-card:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.card-media-wrap {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  position: relative;
  max-height: 220px;
}

.card-media-wrap video,
.card-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.4;
}

.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Archive list styling */
.archive-search-container {
  position: relative;
  margin-bottom: 20px;
}

.archive-search-container input {
  width: 100%;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--panel-border);
  padding: 12px 18px 12px 42px;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}

.archive-search-container .search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.archive-item-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

/* Glass Overlay & Modal Cards */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
  position: relative;
}

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

.modal-card .form-group label {
  font-size: 12px;
  margin-bottom: 4px;
}

.modal-card .form-group input[type="text"],
.modal-card .form-group input[type="number"],
.modal-card .form-group input[type="date"],
.modal-card .form-group textarea,
.modal-card .form-group select {
  padding: 8px 12px !important;
  font-size: 13px !important;
}

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

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Custom Delete & Confirm Modal Cards */
.delete-modal-card, .confirm-modal-card {
  max-width: 380px;
  padding: 16px 18px;
}

.delete-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delete-option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-option-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(30, 41, 59, 0.8);
}

.delete-option-card.active {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.opt-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.opt-icon.danger {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
}

.opt-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opt-details strong {
  font-size: 14px;
  color: #f8fafc;
}

.opt-details span {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
}

.opt-check {
  font-size: 18px;
  color: var(--text-muted);
}

.delete-option-card.active .opt-check {
  color: var(--accent-primary);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.35) !important;
}

.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.5) !important;
}

/* Direct Message Delete Button */
.msg-delete-btn {
  background: transparent;
  border: none;
  color: rgba(244, 63, 94, 0.6);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.msg-delete-btn:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
}

/* Video Control Bar & Customization */
.video-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 20px;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--panel-border);
}

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

.control-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-group {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 3px;
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-ctrl:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-ctrl.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

/* Aspect Ratio Controls */
.aspect-16-9 .card-media-wrap {
  aspect-ratio: 16 / 9;
  height: auto;
}

.aspect-4-3 .card-media-wrap {
  aspect-ratio: 4 / 3;
  height: auto;
}

.aspect-1-1 .card-media-wrap {
  aspect-ratio: 1 / 1;
  height: auto;
}

.aspect-9-16 .card-media-wrap {
  aspect-ratio: 9 / 16;
  max-height: 440px;
}

/* Video Fit Options */
.fit-contain .card-media-wrap video {
  object-fit: contain;
}

.fit-cover .card-media-wrap video {
  object-fit: cover;
}

/* Video Grid Card Size Options */
.grid-large {
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)) !important;
}

.grid-medium {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
}

.grid-small {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
}

.grid-list {
  grid-template-columns: 1fr !important;
}

.grid-list .section-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: auto auto auto 1fr;
  column-gap: 20px;
  align-items: start;
}

.grid-list .card-media-wrap {
  grid-row: 1 / span 5;
  margin-bottom: 0 !important;
}

/* Theater Video Player Modal */
.theater-modal-card {
  width: 90vw;
  max-width: 780px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn 0.2s ease-out;
}

.theater-video-wrap {
  width: 100%;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 55vh;
}

.theater-video-wrap video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.theater-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.theater-desc {
  font-size: 14px;
  color: var(--text-muted);
  flex: 1;
}

.theater-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theater-slider-label {
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theater-slider-label input[type="range"] {
  accent-color: var(--accent-primary);
  cursor: pointer;
}

/* ========================================================= */
/* Responsive Design & Multi-Device Compatibility System     */
/* ========================================================= */

.mobile-sidebar-toggle {
  display: none;
}

/* Sidebar Drawer Overlay for Mobile/Tablet (< 1100px) */
@media (max-width: 1100px) {
  .mobile-sidebar-toggle {
    display: inline-flex;
  }

  .sidebar.glass-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    bottom: 0;
    width: 300px;
    z-index: 1000;
    background: #0f172a;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column;
    padding: 20px;
  }

  .sidebar.glass-sidebar.mobile-open {
    right: 0;
  }

  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
  }

  .sidebar-backdrop.mobile-open {
    display: block;
  }
}

/* Horizontal Scroll Tabs for Touch Devices */
.app-main-tabs {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 6px;
  padding: 6px 12px;
}

.app-main-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Breakpoint 1: Ultra Wide Screens (4K / 2K Monitors > 1600px) */
@media (min-width: 1601px) {
  .app-container {
    max-width: 1750px;
    margin: 0 auto;
  }
  .section-grid {
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  }
  .header-title-gold {
    font-size: 22px;
  }
}

/* Breakpoint 2: Laptops & Medium Screens (1101px - 1600px) */
@media (min-width: 1101px) and (max-width: 1600px) {
  .app-container {
    max-width: 1400px;
  }
}

/* Breakpoint 3: Tablets & Small Laptops (769px - 1100px) */
@media (max-width: 1100px) {
  .glass-header {
    padding: 10px 16px;
    gap: 10px;
  }

  .header-brand {
    gap: 10px;
    min-width: 0;
  }

  .header-title-gold {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .status-tag {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .section-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .video-controls-bar {
    gap: 10px;
  }
}

/* Breakpoint 4: Mobile Phones & Vertical Screens (<= 768px) */
@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .app-container {
    padding: 6px;
    height: 100vh;
    border-radius: 0;
  }

  .glass-header {
    padding: 8px 12px;
    flex-wrap: nowrap !important;
    gap: 8px;
  }

  .header-brand {
    flex: 1;
    min-width: 0;
  }

  .header-logo-img {
    width: 34px;
    height: 34px;
  }

  .header-title-gold {
    font-size: 12.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .status-tag {
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-actions {
    gap: 4px;
    flex-shrink: 0;
  }

  .btn-icon {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .app-main-tabs {
    padding: 4px;
    gap: 4px;
  }

  .nav-tab {
    padding: 7px 10px;
    font-size: 11.5px;
  }

  .message-row {
    max-width: 95%;
  }

  .msg-bubble {
    padding: 10px 12px;
  }

  .chat-input-toolbar {
    flex-wrap: wrap;
    padding: 6px;
    gap: 6px;
  }

  #messageInput {
    width: 100%;
    order: 1;
    min-height: 42px;
    font-size: 13.5px;
  }

  .btn-attach, .btn-mic {
    order: 2;
    width: 38px;
    height: 38px;
  }

  .btn-send {
    order: 3;
    flex: 1;
    height: 38px;
    font-size: 13.5px;
  }

  .video-controls-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 10px;
  }

  .control-group {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .btn-group {
    width: 100%;
    overflow-x: auto;
  }

  .btn-ctrl {
    flex: 1;
    justify-content: center;
    padding: 7px;
    font-size: 10.5px;
  }

  .section-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .modal-card {
    width: 95vw;
    max-height: 92vh;
    overflow-y: auto;
    padding: 14px;
  }

  .theater-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ========================================================= */
/* Light Mode Theme Styling (نمط الورق الدافئ المريح للعين) */
/* ========================================================= */
body.light-theme {
  background: linear-gradient(135deg, #f5f4ef 0%, #e9e8e2 50%, #dfded7 100%) !important;
  color: #1e293b !important;
}

body.light-theme .glass-header {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .header-title-gold {
  background: linear-gradient(135deg, #1e293b 0%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .app-main-tabs {
  background: rgba(241, 239, 233, 0.95) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .nav-tab {
  color: #475569 !important;
}

body.light-theme .nav-tab:hover {
  color: #1e293b !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .nav-tab.active {
  background: linear-gradient(135deg, #0d9488 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3) !important;
}

body.light-theme .glass-sidebar {
  background: rgba(255, 255, 255, 0.82) !important;
  border-left-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .sidebar-header h3 {
  color: #1e293b !important;
}

body.light-theme .user-item {
  background: rgba(245, 243, 237, 0.9) !important;
  color: #1e293b !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}

body.light-theme .user-name {
  color: #1e293b !important;
}

body.light-theme .content-section {
  background: rgba(255, 255, 255, 0.25) !important;
}

body.light-theme .chat-channel-bar {
  background: rgba(255, 255, 255, 0.88) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .channel-title {
  color: #1e293b !important;
}

body.light-theme .msg-sender-name {
  color: #334155 !important;
}

body.light-theme .msg-bubble {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .msg-bubble.self {
  background: linear-gradient(135deg, #0d9488 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: none !important;
}

body.light-theme .chat-input-toolbar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme #messageInput {
  background: #fdfdfc !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .btn-icon {
  background: rgba(0, 0, 0, 0.05) !important;
  color: #334155 !important;
}

body.light-theme .btn-icon:hover {
  background: rgba(0, 0, 0, 0.08) !important;
  color: #1e293b !important;
}

body.light-theme .section-card,
body.light-theme .video-controls-bar,
body.light-theme .archive-item-card {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .card-title {
  color: #1e293b !important;
}

body.light-theme .card-desc {
  color: #475569 !important;
}

body.light-theme .modal-card {
  background: rgba(255, 255, 255, 0.98) !important;
  color: #1e293b !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12) !important;
}

body.light-theme .modal-header h3 {
  color: #1e293b !important;
}

body.light-theme .form-group label {
  color: #334155 !important;
}

body.light-theme .form-group input[type="text"],
body.light-theme .form-group input[type="number"],
body.light-theme .form-group input[type="date"],
body.light-theme .form-group textarea,
body.light-theme .form-group select {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

body.light-theme .welcome-banner {
  background: rgba(255, 255, 255, 0.85) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}

/* ========================================================= */
/* National Memory Interactive Marquee Ticker (شريط التوثيق)  */
/* ========================================================= */
.memory-ticker-wrapper {
  margin-bottom: 20px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(10px);
}

.memory-ticker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  flex-shrink: 0;
  padding-left: 12px;
  border-left: 1px solid var(--panel-border);
}

.memory-ticker-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.memory-ticker-track {
  display: flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  width: max-content;
  animation: tickerScrollRtl 30s linear infinite;
}

/* Pause running animation on hover (توقف الشريط فور مرور المؤشر) */
.memory-ticker-wrapper:hover .memory-ticker-track {
  animation-play-state: paused;
}

@keyframes tickerScrollRtl {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  white-space: nowrap;
}

.ticker-badge i.red-icon {
  color: #f43f5e !important;
  font-size: 14px;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 2px 4px rgba(244, 63, 94, 0.4));
}

.ticker-badge:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #ffffff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.25);
}

.ticker-badge:hover i.red-icon {
  transform: scale(1.3) rotate(-8deg);
  color: #ff2a4b !important;
}

body.light-theme .memory-ticker-wrapper {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .memory-ticker-header {
  color: #1e293b !important;
  border-left-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .ticker-badge {
  background: rgba(245, 243, 237, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  color: #1e293b !important;
}

body.light-theme .ticker-badge:hover {
  background: rgba(244, 63, 94, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.4) !important;
  color: #1e293b !important;
}

/* ========================================================= */
/* Google Sign-In Button Styling (زر الدخول عبر جوجل)        */
/* ========================================================= */
.google-login-section {
  margin-top: 15px;
  margin-bottom: 10px;
  width: 100%;
}

.btn-google-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  background: #ffffff !important;
  color: #3c4043 !important;
  border: 1px solid #dadce0 !important;
  border-radius: var(--radius-md) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.btn-google-login:hover {
  background: #f8f9fa !important;
  border-color: #d2e3fc !important;
  box-shadow: 0 6px 18px rgba(66, 133, 244, 0.3) !important;
  transform: translateY(-2px) !important;
}

.btn-google-login svg {
  flex-shrink: 0;
}

.google-account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.google-account-item:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #fbbf24;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
}

.google-account-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Non-Authorized Visitor / Regular Employee Restrictions */
body.user-role-visitor .app-main-tabs button[data-target="chatSection"],
body.user-role-visitor .section-header-bar button,
body.user-role-visitor .chat-input-toolbar,
body.user-role-visitor .btn-upload-trigger,
body.user-role-visitor .msg-delete-btn,
body.user-role-visitor .card-actions button.btn-logout {
  display: none !important;
}

body.user-role-visitor #chatSection {
  display: none !important;
}

/* ========================================================= */
/* Live Urgent News Ticker Marquee (تايتل الأخبار المتحرك)   */
/* ========================================================= */
.news-ticker-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  margin: 10px 0 15px 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.ticker-label-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-gradient);
  color: #0f172a;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-label-badge .pulse-icon {
  font-size: 13px;
  animation: pulseGold 1.5s infinite;
}

@keyframes pulseGold {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.ticker-scroll-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.ticker-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  white-space: nowrap;
  will-change: transform;
  animation: marqueeScroll 25s linear infinite;
}

.ticker-marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.ticker-news-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 14px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.ticker-news-item i {
  color: #fbbf24;
}

.news-ticker-bar.theme-red {
  border-color: rgba(244, 63, 94, 0.4);
}

.news-ticker-bar.theme-red .ticker-label-badge {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  color: #ffffff;
}

.news-ticker-bar.theme-blue {
  border-color: rgba(59, 130, 246, 0.4);
}

.news-ticker-bar.theme-blue .ticker-label-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
}

/* ========================================================= */
/* Modal Overlay System & Login Modal Styling                */
/* ========================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card, .modal-card {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(245, 158, 11, 0.15);
}




