:root {
  --primary-color: #1e293b; /* Dark Navy for table headers */
  --bg-color: #f1f5f9; /* softer light gray-blue */
  --card-bg: rgba(255, 255, 255, 0.85); /* More transparent for glass effect */
  --glass-border: rgba(255, 255, 255, 0.5); /* Lighter border for glass feel */
  --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07); /* Floating shadow */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent-teal: #0d9488;
  --accent-blue: #2563eb;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --sidebar-bg: #ffffff; /* Modern White */
  --sidebar-text: #1e293b;
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --v9-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
}

/* Dashboard Layout - V4 Absolute Stability */
.dashboard-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden; /* Prevent body scroll */
}

/* New Top Navbar */
.top-navbar {
  background: #1e293b; /* Back to dark panel */
  color: white;
  padding: 0 1.5rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--accent-blue);
  z-index: 1000;
  flex-shrink: 0;
}

.top-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: #2dd4bf; /* bright teal on dark */
  letter-spacing: 1px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-logo img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  border-radius: 50%;
  background: white; /* Add white background to fill the circle */
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.top-title-group h1 {
  font-size: 1.15rem;
  margin: 0;
  color: white;
  white-space: nowrap;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: fit-content;
}

.top-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent-teal);
  letter-spacing: 1px;
  white-space: nowrap;
}

.top-title-group {
  flex: 1;
  text-align: center;
  padding: 0 1rem;
}

.top-title-group h1 {
  font-size: 1.15rem;
  margin: 0;
  color: white;
  white-space: nowrap;
}

.top-title-group .timestamp {
  font-size: 0.65rem;
  color: #94a3b8;
}

.top-filters-area {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.top-filters-area select option {
  background-color: #1e293b;
  color: white;
}

/* Sidebar & Body Layout - V8 Restoration */
.dashboard-body { display: flex; flex: 1; position: relative; width: 100vw; height: 100vh; overflow: hidden; }

/* Sidebar Styling - RELATIVE TO BODY */
.sidebar {
  position: absolute; /* Fixed inside the relative .dashboard-body */
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 1rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
}

.sidebar.collapsed { width: 70px; }

/* Main Content Area - FILL BODY */
.main-content { flex: 1; margin-left: 260px; height: 100vh; overflow-y: auto; overflow-x: auto; background: #f1f5f9; padding: 2rem; padding-bottom: 50px; }

/* Force extra scroll space at the bottom of the main content */
.main-content::after {
  content: "";
  display: block;
  min-height: 250px;
  width: 100%;
  flex-shrink: 0;
}

/* Handle Content Offset when Side Menu is Collapsed */
.main-content.sidebar-collapsed {
  margin-left: 70px;
}

/* Custom Scrollbars */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.toggle-sidebar-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.toggle-sidebar-btn:hover { background: var(--accent-blue); }

/* Navigation Styling */
.nav-group { display: flex; flex-direction: column; gap: 0.1rem; }
.nav-group-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin: 1.2rem 0.6rem 0.5rem 0.6rem;
  display: block;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: none;
}
.sidebar.collapsed .nav-group-label { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  text-decoration: none;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  width: calc(100% - 2rem);
  margin: 0.15rem 0.8rem 0.15rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  text-transform: uppercase;
}

.nav-item:hover { 
  background: rgba(59, 130, 246, 0.05); 
  color: var(--accent-blue); 
  transform: translateX(4px); 
}
.nav-item.active { 
  background: var(--v9-gradient); 
  color: white; 
  box-shadow: 0 4px 10px -3px rgba(59, 130, 246, 0.4); 
}

.sidebar.collapsed .nav-item { 
  justify-content: center; 
  padding: 0.75rem; 
  width: calc(100% - 1.2rem); 
  margin: 0.2rem 0.6rem; 
}
.sidebar.collapsed .nav-text { display: none; }

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.kpi-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kpi-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  background: rgba(255, 255, 255, 0.95);
}

.kpi-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.kpi-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--glass-border);
  margin-top: 0.5rem;
}

.kpi-sub-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.kpi-sub-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Charts Grid */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  padding: 1.5rem;
  height: 400px;
  box-shadow: var(--card-shadow);
  transition: all 0.4s ease;
  overflow: hidden;
}

.chart-card.full-width-chart {
  grid-column: 1 / -1;
  height: auto;
  overflow: visible;
}

.chart-card:hover {
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  border-color: var(--accent-blue);
}

.chart-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* Main Content Wrapper */

.sidebar.collapsed + .main-content { flex: 1; margin-left: 70px; height: 100vh; overflow-y: auto; overflow-x: auto; background: #f1f5f9; padding: 2rem; padding-bottom: 50px; }

.tab-btn.active {
  background: var(--accent-blue);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tab-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
}

.view-section {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-section.active { display: block !important; opacity: 1 !important; visibility: visible !important;
  display: block;
}

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

/* Report Model Matrix Styles */
.report-card {
  background: var(--card-bg);
  backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  padding: 1.5rem;
  overflow-x: auto;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.02);
}

.report-table {
  width: 100%;
  border-collapse: separate; /* Required for sticky borders */
  border-spacing: 0;
  font-size: 0.85rem;
}

.report-table.excel-style {
  width: max-content;
  min-width: 100%;
}

.report-table th, .report-table td {
  padding: 0.6rem 0.8rem;
  border: 1px solid #cbd5e1;
}

.report-table th {
  background: #1e293b;
  color: white;
  text-transform: uppercase;
  text-align: center;
  z-index: 1;
}

/* Robust 3-Column Sticky Freeze for Report Table */
/* Robust 3-Column Sticky Freeze for Report Table */
.report-table .sticky-col-1 {
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background-color: #ffffff !important;
  min-width: 160px !important;
  max-width: 160px !important;
  border-right: 1px solid #cbd5e1 !important;
}

.report-table .sticky-col-2 {
  position: sticky !important;
  left: 160px !important;
  z-index: 10 !important;
  background-color: #f8fafc !important;
  min-width: 160px !important;
  max-width: 160px !important;
  border-right: 1px solid #cbd5e1 !important;
}

.report-table .sticky-col-3 {
  position: sticky !important;
  left: 320px !important;
  z-index: 10 !important;
  background-color: #f1f5f9 !important;
  min-width: 140px !important;
  max-width: 140px !important;
  border-right: 2px solid #64748b !important;
}

/* Fix: Ensure HEADERS stay dark blue and stay ON TOP of vertical scroll */
.report-table thead th.sticky-col-1,
.report-table thead th.sticky-col-2,
.report-table thead th.sticky-col-3 {
    background-color: #1e293b !important;
    color: white !important;
    z-index: 300 !important; /* Highest priority for corner headers */
    left: inherit; /* Should inherit from the col classes if used on same element */
}

/* Explicit offsets for the th specifically to be sure */
.report-table thead th.sticky-col-1 { left: 0 !important; }
.report-table thead th.sticky-col-2 { left: 160px !important; }
.report-table thead th.sticky-col-3 { left: 320px !important; }

/* Specific sticky for summary rows - ensure opacity */
.excel-style .sticky-col-1-2,
.report-table .sticky-col-1-2 {
  position: sticky !important;
  left: 0 !important;
  z-index: 160 !important;
  background-color: #f1f5f9 !important; /* Solid summary background */
  border-right: 2px solid #64748b !important;
  min-width: 460px !important; /* Span all 3 freeze columns */
}

/* Header Stickies */
.report-table thead th {
  position: sticky !important;
  top: 0;
  z-index: 200 !important;
}

.report-table thead th.sticky-col-1 { z-index: 250 !important; }
.report-table thead th.sticky-col-2 { z-index: 250 !important; }
.report-table thead th.sticky-col-3 { z-index: 250 !important; }

/* Header Sticky (Top) */
.excel-style thead th, 
.excel-style tr:nth-child(1) th,
.excel-style tr:nth-child(2) th {
  position: sticky !important;
  top: 0;
  z-index: 200 !important; /* Higher than side sticky */
  background-color: #f8fafc !important;
}

/* Intersection of Top and Left Sticky */
.excel-style .sticky-col-1[rowspan],
.excel-style .sticky-col-2[rowspan],
.excel-style thead .sticky-col-1,
.excel-style thead .sticky-col-2 {
  z-index: 250 !important; /* Highest z-index for corner headers */
  top: 0;
}

.excel-style tr:hover td {
  filter: brightness(0.98);
}

.row-total-ng {
  font-weight: 700;
}

.row-rejection, .row-rejection td, .row-cost, .row-cost td {
  color: #ef4444 !important; /* Strong red */
  font-weight: 700 !important;
}

.row-cost {
  background: transparent !important;
  border-bottom: 2px solid rgba(239, 68, 68, 0.2) !important;
}

.row-vt-summary, .row-yellow-summary {
  background: #fffbeb !important; /* Amber-50: Softer yellow */
  font-weight: 700;
  color: #92400e;
}

.row-orange-summary {
  font-weight: 700;
  color: #c2410c; /* Orange-700 */
}

/* Orange block from end to end */
.row-orange-summary td {
  background: #fed7aa !important; /* Solid Orange-200 */
  color: #7c2d12 !important; /* Dark orange text for readability */
  border-color: #fdba74 !important; /* Light border consistency */
}

.row-orange-summary .row-model-header,
.row-orange-summary .row-category {
  font-weight: 800;
}

.row-blue-summary {
  background: #eff6ff !important; /* Blue-50: Softer blue */
  font-weight: 700;
  color: #1e40af;
}

.cell-month-data {
  text-align: center;
  min-width: 80px;
}

.cell-total {
  background: #f1f5f9; /* Match model header for balance */
  font-weight: 700;
  text-align: center;
  /* Removed sticky to avoid freezing per user request */
  border-left: 2px solid #cbd5e1 !important;
}

.report-table tr:hover td {
  background-color: rgba(45, 212, 191, 0.05);
}

.active-month-col {
  background-color: #fff7ed !important; /* Light amber background */
  color: #c2410c !important; /* Dark orange text */
  font-weight: 700 !important;
  border-left: 2px solid #fdba74 !important;
  border-right: 2px solid #fdba74 !important;
}

/* Login Page Styles */
.login-body {
    background: linear-gradient(135deg, #e0f2fe 0%, #ccfbf1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    display: flex;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    width: 1000px;
    max-width: 100%;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

.login-visual {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 3rem;
    color: white;
}

/* Certificate Stack Gallery (Staggered Style) */
.cert-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex; /* Keep for general alignment if needed */
}

.cert-item {
    position: absolute;
    width: 58%;
    max-height: 70%;
    background: white;
    padding: 0.4rem;
    border-radius: 0.4rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.35);
    border: 5px solid white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    object-fit: contain;
}

.cert-iatf { 
    top: 10%; 
    left: 12%; 
    z-index: 1; 
    transform: rotate(-3deg);
}
.cert-iso14001 { 
    top: 22%; 
    left: 22%; 
    z-index: 2; 
    transform: rotate(0deg);
}
.cert-iso45001 { 
    top: 34%; 
    left: 32%; 
    z-index: 1; 
    transform: rotate(3deg);
}

.cert-item:hover {
    z-index: 100 !important;
    transform: scale(1.1) rotate(0deg) !important;
    box-shadow: 0 30px 50px rgba(0,0,0,0.5);
    left: 25% !important; /* Move to center on hover for full view */
    top: 20% !important;
}

.login-form-side {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    width: 180px;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #64748b;
    margin-bottom: 2.5rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #475569;
}

.login-input {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.login-input:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to right, #3b82f6, #2dd4bf);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.login-error {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    .login-container { flex-direction: column; width: 400px; }
    .login-visual { display: none; }
}

/* Certificate Modal View Full Screen */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    border-radius: 0.5rem;
    box-shadow: 0 5px 35px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s forwards;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.1); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: #f1f1f1;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
}

.close-modal:hover {
    color: #bbb;
    transform: scale(1.2);
}

@media only screen and (max-width: 700px){
    .modal-content {
        width: 100%;
    }
}

/* User Management Panel Styles */
.user-management-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.user-form-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
}

.user-table-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    flex: 2;
    min-width: 400px;
}

.input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 15px;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-delete {
    background: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #fecaca;
}

.role-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

.role-admin { background: #dcfce7; color: #166534; }
.role-user { background: #f1f5f9; color: #475569; }

/* Breakdown Tables for Top Defect Log */
.breakdown-container {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

.breakdown-box {
    flex: 1;
    min-width: 300px;
    background: white;
    border: 1px solid #000;
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

.breakdown-table th {
    background: #bae6fd; /* light blue */
    color: #000;
    padding: 6px;
    border: 1px solid #000;
    text-align: center;
    font-weight: bold;
    text-transform: none; /* Override global th uppercase */
}

.breakdown-table td {
    padding: 6px 10px;
    border: 1px solid #000;
}

.breakdown-model-cell {
    background: #fef08a; /* yellow */
    font-weight: 600;
}

.breakdown-qty-cell {
    text-align: right;
    padding-right: 20px;
}

.breakdown-footer-row td {
    border: none !important;
    padding-top: 10px;
}

/* QC Organization Chart - Simplified Flexbox Layout */
.org-chart-wrapper {
    width: 100%;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.org-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
}

/* Vertical Connectors */
.org-connector-v {
    width: 2px;
    height: 40px;
    background: #cbd5e1;
    margin: 0 auto;
}

/* Horizontal Connector Line for Staff Row */
.org-staff-row-wrapper {
    position: relative;
    padding-top: 40px;
}

.org-staff-row-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #cbd5e1;
}

.org-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    width: 180px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    z-index: 10;
}

.org-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    background: white;
}

.org-photo-wrapper {
    width: 100px;
    height: 100px;
    margin-bottom: 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.org-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.org-name {
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
    color: #1e293b;
    text-transform: uppercase;
    text-align: center;
}

.org-role {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
}
/* Modal Form Styles */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}
.form-row .form-group {
    flex: 1;
}
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #334155;
    font-size: 0.9rem;
}
.form-group input, .form-group select, .form-group textarea {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}



.doc-log-table { width: 100%; border-collapse: collapse; text-align: center; font-size: 0.85rem; border: 2px solid black; font-family: sans-serif; background: #fff; margin-bottom: 25px; }
.doc-log-table td, .doc-log-table th { border: 1px solid black !important; padding: 5px; height: 1.5rem; color: #000; }
.doc-log-title { font-size: 1.5rem !important; font-weight: bold !important; vertical-align: middle !important; }
.doc-log-header { font-weight: bold !important; background-color: #f8fafc !important; }
