/* D:\eexm\support\css\support-modern.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Light Theme - Default */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-header: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-overlay: rgba(15, 23, 42, 0.5);
  --bg-panel: #ffffff;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-inverse: #ffffff;
  --text-accent: #3b82f6;
  
  --border-color: #e2e8f0;
  --border-glass: rgba(255, 255, 255, 0.3);
  
  --brand-blue: #3b82f6;
  --brand-green: #10b981;
  --brand-red: #ef4444;
  --brand-orange: #f59e0b;
  --brand-purple: #8b5cf6;
  
  --btn-primary: linear-gradient(135deg, #2563eb, #1e40af);
  --btn-success: linear-gradient(135deg, #059669, #065f46);
  --btn-danger: linear-gradient(135deg, #dc2626, #991b1b);
  --btn-warning: linear-gradient(135deg, #d97706, #92400e);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-glass: rgba(30, 41, 59, 0.7);
  --bg-header: #1e293b;
  --bg-sidebar: #1e293b;
  --bg-overlay: rgba(0, 0, 0, 0.8);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-inverse: #ffffff;
  --text-accent: #60a5fa;
  
  --border-color: #334155;
  --border-glass: rgba(255, 255, 255, 0.1);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.4);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  touch-action: pan-y; /* Prevent unwanted horizontal swipes */
}

html {
  overflow-x: hidden;
}

/* Layout Utilities */
.row::after { content: ""; clear: both; display: table; }
[class*="col-"] { float: left; padding: 12px; transition: width 0.3s ease; }

@media only screen and (min-width: 768px) {
  .col-1 {width: 8.33%;} .col-3 {width: 25%;} .col-6 {width: 50%;} .col-9 {width: 75%;} .col-12 {width: 100%;}
}
@media only screen and (max-width: 767px) {
  [class*="col-s-"] { width: 100%; }
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Header & Toggle */
.header {
  position: fixed;
  top: 0; width: 100%;
  height: 64px;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
}

.menu-controls { display: flex; gap: 16px; align-items: center; }

.theme-toggle {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Sidebar Menu (High Visibility) */
.menu {
  position: fixed;
  top: 64px;
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  z-index: 90;
  transition: transform 0.3s ease;
}

@media only screen and (max-width: 767px) {
  .menu { transform: translateX(-100%); width: 100%; }
  .menu.open { transform: translateX(0); }
}

.menu-info { margin-bottom: 32px; }
.menu-info .label { color: var(--text-secondary); font-size: 11px; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; }
.menu-info .value { color: var(--text-primary); font-size: 15px; font-weight: 600; margin-bottom: 12px; }

.menu ul { list-style: none; }
.menu li {
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.menu li:hover {
  background: var(--text-accent);
  color: white;
}
.menu li img { width: 18px; filter: brightness(0) invert(1); opacity: 0; transition: 0.2s; }
.menu li:hover img { opacity: 1; }

#maincnt {
  margin-top: 64px;
  transition: margin-left 0.3s ease;
}
@media only screen and (min-width: 768px) {
  #maincnt { margin-left: 280px; width: calc(100% - 280px); }
}

/* Buttons (Premium) */
button, .bt {
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover { filter: brightness(1.1); transform: translateY(-1px); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary { background: var(--btn-primary); color: #ffffff !important; }
.btn-success { background: var(--btn-success); color: #ffffff !important; }
.btn-danger { background: var(--btn-danger); color: #ffffff !important; }
.btn-warning { background: var(--btn-warning); color: #ffffff !important; }

/* Default button style for those without class */
button:not([class]), .btn-secondary {
    background: var(--bg-body);
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

/* Inputs & Form (High Visibility) */
input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card); /* Strong background for contrast */
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary) !important;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none; /* For better styling on iOS */
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='Length19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

[data-theme="dark"] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

/* Ensure dropdown options are readable */
select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--text-accent);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Dashboard Elements */
.summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.summary-item {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.summary-item span:first-child { font-size: 11px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; }
.summary-item span:last-child { font-size: 24px; font-weight: 700; color: var(--text-accent); }

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.action-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border-color);
  border-left: 6px solid var(--accent-color, var(--brand-blue));
  transition: all 0.2s;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-body);
}

.action-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(var(--accent-rgb, 59, 130, 246), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.action-card-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.action-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Login / Approve Screen (Instant & Centered) */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../img/login-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

.overlay-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4); /* Subtle darkening for the image */
    z-index: 1;
}

.overlay-screen.solid-backdrop {
    background: var(--bg-body);
    z-index: 20000;
    background-image: none;
}
.overlay-screen.solid-backdrop::before { display: none; }

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 48px;
    border-radius: var(--radius-lg);
    animation: slideInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 20001;
    background: var(--bg-card);
}

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

/* Modals & Panels */
.side-panel {
  position: fixed;
  right: 0; top: 0;
  width: 0; height: 100%;
  background: var(--bg-card);
  z-index: 110;
  overflow-y: auto;
  box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.side-panel-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.side-panel-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-body);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-weight: bold;
}

/* Progressive Loader */
.loader-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-body);
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loader-bar-container {
    width: 200px;
    height: 4px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: var(--brand-blue);
    position: absolute;
    top: 0; left: 0;
    transition: width 0.3s ease;
}

.loader-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Form Styles for Panels */
.panel-content {
    padding: 32px;
}

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.data-section {
    margin-bottom: 32px;
    padding: 20px;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.data-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-accent);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.data-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.data-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Custom Modal (Alert/Prompt) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-overlay);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 32px;
    text-align: center;
    animation: modalPop 0.3s cubic-bezier(0.17, 0.89, 0.32, 1.49);
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon { font-size: 48px; margin-bottom: 16px; }
.modal-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.modal-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

