/* --- HomeCircle Admin Portal Custom Styling (Desktop-First) --- */

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

:root {
  --primary-blue: #1D75BD;
  --primary-green: #7BC143;
  --accent-orange: #F97316;
  
  --dark-slate: #0F172A;
  --bg-slate-dark: #1E293B;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  
  --bg-light: #FFFDF9; /* Warm sunlight main content area */
  --bg-panel: #FFFFFF;
  
  --orange-light: #FFF7ED;
  --orange-border: rgba(249, 115, 22, 0.15);
  --orange-text: #C2410C;
  
  --green-light: #ECFDF5;
  --green-border: rgba(16, 185, 129, 0.15);
  --green-text: #065F46;
  
  --blue-light: #EFF6FF;
  --blue-border: rgba(37, 99, 235, 0.15);
  --blue-text: #1E40AF;
  
  --red-light: #FEF2F2;
  --red-border: rgba(239, 68, 68, 0.15);
  --red-text: #991B1B;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.04), 0 2px 4px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.05);
  --shadow-premium: 0 25px 50px -12px rgba(29, 117, 189, 0.05), 0 10px 20px -5px rgba(249, 115, 22, 0.03);
  
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', sans-serif;
  color: var(--dark-slate);
  font-weight: 800;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition-bounce);
  cursor: pointer;
  border: none;
  min-height: 36px;
}

.btn-primary {
  background: var(--primary-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 10px -2px rgba(29, 117, 189, 0.2);
}
.btn-primary:hover {
  background: #145991;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(29, 117, 189, 0.05);
  color: var(--primary-blue);
  border: 1px solid rgba(29, 117, 189, 0.1);
}
.btn-secondary:hover {
  background: rgba(29, 117, 189, 0.1);
}

.btn-outline {
  background: transparent;
  color: #94A3B8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-danger {
  background: #EF4444;
  color: #FFFFFF;
  box-shadow: 0 4px 10px -2px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  background: #DC2626;
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--accent-orange);
  color: #FFFFFF;
  box-shadow: 0 4px 10px -2px rgba(249, 115, 22, 0.2);
}
.btn-warning:hover {
  background: #EA580C;
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* --- LOGO STYLE --- */
.logo-home {
  color: var(--primary-blue);
}
.logo-circle {
  color: var(--primary-green);
}

/* ================= AUTH CONTAINER ================= */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(29, 117, 189, 0.05) 0%, rgba(249, 115, 22, 0.03) 100%), #FFFDF9;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-premium);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.logo-badge {
  font-size: 11px;
  background: var(--accent-orange);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-header h1 {
  font-size: 22px;
  letter-spacing: -0.5px;
}

.auth-header p.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

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

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark-slate);
}

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  background: #FFFDF9;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(29, 117, 189, 0.1);
}

.forgot-pwd-placeholder {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.forgot-pwd-placeholder a:hover {
  color: var(--primary-blue);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 500;
}
.alert.error {
  background: var(--red-light);
  border: 1px solid var(--red-border);
  color: var(--red-text);
}

.credentials-card {
  margin-top: 32px;
  background: var(--orange-light);
  border: 1px solid var(--orange-border);
  border-radius: 16px;
  padding: 16px;
}
.credentials-card h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--orange-text);
  margin-bottom: 8px;
}
.cred-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-dark);
}
.cred-grid code {
  background: rgba(255,255,255,0.7);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 700;
}
.cred-note {
  font-size: 11px;
  margin-top: 8px;
  color: var(--orange-text);
  font-weight: 600;
}

/* ================= DASHBOARD MAIN LAYOUT ================= */
.dashboard-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
  background-color: var(--dark-slate);
  color: #94A3B8;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 100;
}

.sidebar-brand {
  height: 80px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.badge-role {
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-profile {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

.profile-info h4 {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
}
.profile-info span {
  font-size: 11.5px;
  color: #64748B;
  display: block;
}

.sidebar-menu {
  flex-grow: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.menu-item {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  text-align: left;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition-smooth);
}

.menu-item:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
  color: #FFFFFF;
  background: rgba(29, 117, 189, 0.15);
  border-left: 3px solid var(--primary-blue);
}

.menu-icon {
  font-size: 16px;
}

.badge-count {
  margin-left: auto;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
}
.badge-count.alert-count {
  background: #EF4444;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* MAIN CONTENT */
.main-content {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
}

.content-header {
  height: 80px;
  padding: 0 40px;
  border-bottom: 1.5px solid var(--border-color);
  background: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.content-header h1 {
  font-size: 24px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.live-indicator {
  font-size: 11px;
  font-weight: 800;
  color: #10B981;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px;
  border-radius: 50px;
  letter-spacing: 0.5px;
}

.content-body {
  padding: 40px;
  flex-grow: 1;
}

/* TAB PANELS */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

/* ================= TAB: DASHBOARD MODULE ================= */
.welcome-banner {
  background: linear-gradient(135deg, var(--dark-slate) 0%, #1E293B 100%);
  color: #FFFFFF;
  padding: 32px 40px;
  border-radius: 20px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}
.welcome-banner h2 {
  color: #FFFFFF;
  font-size: 26px;
  margin-bottom: 6px;
}
.welcome-banner p {
  color: #94A3B8;
  font-size: 14.5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(29, 117, 189, 0.2);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue { background: var(--blue-light); color: var(--primary-blue); }
.icon-green { background: var(--green-light); color: var(--primary-green); }
.icon-red { background: var(--red-light); color: #EF4444; }
.icon-orange { background: var(--orange-light); color: var(--accent-orange); }
.icon-pink { background: #FDF2F8; color: #EC4899; }
.icon-yellow { background: #FEF9C3; color: #CA8A04; }
.icon-purple { background: #F3E8FF; color: #8B5CF6; }
.icon-cyan { background: #ECFEFF; color: #0891B2; }

.stat-info h3 {
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark-slate);
  line-height: 1;
}

.stat-info p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.widget-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.widget-box h3 {
  font-size: 17px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--border-color);
  padding-bottom: 12px;
}

/* QUICK ACTION ITEMS */
.quick-queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}
.queue-item:hover {
  border-color: rgba(29, 117, 189, 0.15);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.queue-details {
  display: flex;
  align-items: center;
  gap: 14px;
}
.queue-icon {
  font-size: 22px;
}
.queue-text h4 {
  font-size: 14px;
  color: var(--dark-slate);
}
.queue-text p {
  font-size: 12px;
  color: var(--text-muted);
}

/* TIMELINE */
.activity-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}
.activity-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border-color);
}
.timeline-item {
  position: relative;
}
.timeline-dot {
  position: absolute;
  left: -20px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-blue);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--border-color);
}
.timeline-content {
  font-size: 13px;
}
.timeline-content p {
  color: var(--text-dark);
  font-weight: 500;
}
.timeline-time {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* ================= TABLES & DATA ENTRIES ================= */
.card-table-wrapper {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #F8FAFC;
  padding: 16px 24px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1.5px solid var(--border-color);
}

.data-table td {
  padding: 20px 24px;
  border-bottom: 1.5px solid var(--border-color);
  font-size: 13.5px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background-color: rgba(29, 117, 189, 0.01);
}

/* COLUMN STYLING */
.col-bold {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--dark-slate);
}
.col-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

.actions-col {
  text-align: right;
}

.actions-wrapper {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.doc-link {
  font-weight: 600;
  color: var(--primary-blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.doc-link:hover {
  text-decoration: underline;
}

/* STATUS BADGES */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}

.badge-pending { background: var(--orange-light); border: 1px solid var(--orange-border); color: var(--orange-text); }
.badge-active { background: var(--green-light); border: 1px solid var(--green-border); color: var(--green-text); }
.badge-rejected { background: var(--red-light); border: 1px solid var(--red-border); color: var(--red-text); }
.badge-flagged { background: var(--red-light); border: 1px solid var(--red-border); color: var(--red-text); }
.badge-closed { background: #F1F5F9; border: 1px solid var(--border-color); color: var(--text-muted); }

/* ================= DIRECTORY FILTER BAR ================= */
.directory-filter-bar {
  background: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}

.filter-group {
  flex-grow: 1;
  min-width: 160px;
}
.filter-search {
  flex-grow: 2.5;
}

.filter-group input, .filter-group select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border-color);
  font-size: 13px;
  background: var(--bg-light);
}

/* ================= POPUP DIALOGS ================= */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.active {
  display: flex;
}

.modal-content {
  background: #FFFFFF;
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  animation: modalScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1.5px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 18px;
}

.close-btn {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.close-btn:hover {
  color: var(--dark-slate);
}

.modal-body {
  padding: 32px;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1.5px solid var(--border-color);
  background: #F8FAFC;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* MOCK DOC CONTAINER */
.document-preview-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  background: var(--blue-light);
  border: 1px solid var(--blue-border);
  margin-bottom: 20px;
}
.doc-icon {
  font-size: 32px;
}
.doc-details h4 {
  font-size: 14px;
  color: var(--blue-text);
}
.doc-details p {
  font-size: 12px;
  color: var(--text-muted);
}

.document-rendering-placeholder {
  background: var(--dark-slate);
  border-radius: 12px;
  padding: 24px;
  color: #FFFFFF;
  font-family: monospace;
  font-size: 12px;
}
.document-rendering-placeholder p {
  color: #64748B;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.document-mock-data strong {
  color: var(--accent-orange);
  display: block;
  margin-bottom: 4px;
}
.document-mock-data p {
  color: #E2E8F0;
  border: none;
  padding: 0;
  margin: 0;
  line-height: 1.4;
}

/* ================= DESKTOP FIRST OVERRIDES ================= */
@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 240px 1fr;
  }
  .content-header, .content-body {
    padding-left: 24px;
    padding-right: 24px;
  }
}
