/* ============================================================
   PMEXINC PORTAL — Modern Light Theme
   ============================================================ */

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

:root {
  --primary:       #2563eb;
  --primary-light: #eff6ff;
  --primary-hover: #1d4ed8;
  --accent:        #06b6d4;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --bg:            #f1f5f9;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --border:        #e2e8f0;
  --border-focus:  #2563eb;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:        0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:     0 10px 40px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.06);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     6px;
}

/* ─── BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color .18s; }
a:hover { color: var(--primary-hover); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── NAVBAR ───────────────────────────────────────────── */
.navbar {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 0 !important;
  min-height: 60px !important;
}

.navbar .container {
  min-height: 60px;
  display: flex;
  align-items: center;
}

.navbar-brand {
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  letter-spacing: -0.3px !important;
  padding: 0 !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
}

.navbar .nav-link {
  color: rgba(255,255,255,0.80) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  border-radius: var(--radius-xs) !important;
  transition: all .18s !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.navbar .nav-link:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,0.12) !important;
}
.navbar .nav-link i { color: inherit !important; }

.navbar-toggler {
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  border-radius: var(--radius-xs) !important;
}
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important; }

/* ─── DROPDOWN ─────────────────────────────────────────── */
.dropdown-menu {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 6px !important;
  margin-top: 4px !important;
}
.dropdown-item {
  color: var(--text) !important;
  border-radius: var(--radius-xs) !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  transition: all .15s !important;
}
.dropdown-item:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}
.dropdown-divider { border-color: var(--border) !important; }

/* ─── PAGE BACKGROUND ──────────────────────────────────── */
.container.mb-auto {
  padding-top: 24px !important;
  padding-bottom: 40px !important;
}

/* ─── CARDS ────────────────────────────────────────────── */
.card {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  color: var(--text) !important;
}
.card-header {
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  padding: 14px 20px !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-body { padding: 20px !important; color: var(--text) !important; }

/* ─── LOGIN PAGE ───────────────────────────────────────── */
#login-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 65vh;
  padding: 20px;
}

#login-form .card {
  width: 100% !important;
  max-width: 400px !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border) !important;
  overflow: hidden !important;
  position: relative !important;
}

#login-form .card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

#login-form .card-header {
  background: var(--surface-2) !important;
  padding: 22px 24px 18px !important;
  text-align: center;
  border-bottom: 1px solid var(--border) !important;
}
#login-form .card-header h5 {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin: 0 !important;
}
#login-form .card-body { padding: 24px !important; }
#login-form .lostpwd {
  display: block;
  text-align: center;
  font-size: 12px;
  margin-top: 14px;
  color: var(--text-muted) !important;
}

/* ─── FORMS ────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-xs) !important;
  color: var(--text) !important;
  font-size: 13.5px !important;
  padding: 9px 12px !important;
  transition: all .18s !important;
}
.form-control::placeholder { color: var(--text-light) !important; }
.form-control:focus, .form-select:focus {
  background: var(--surface) !important;
  border-color: var(--border-focus) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
  color: var(--text) !important;
  outline: none !important;
}
.form-label {
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  margin-bottom: 5px !important;
}
.input-group-text {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  font-size: 14px !important;
}
.eye-icon {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-left: none !important;
  color: var(--text-muted) !important;
  cursor: pointer;
}
.form-check-input {
  border-color: var(--border) !important;
}
.form-check-input:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}
.form-check-label { color: var(--text-muted) !important; font-size: 13px !important; }

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn-primary {
  background: var(--primary) !important;
  border: none !important;
  border-radius: var(--radius-xs) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  padding: 9px 20px !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25) !important;
  transition: all .18s !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-hover) !important;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}
.btn-primary:active { transform: translateY(0) !important; }

.btn-outline-primary {
  border: 1.5px solid var(--primary) !important;
  color: var(--primary) !important;
  background: transparent !important;
  border-radius: var(--radius-xs) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: all .18s !important;
}
.btn-outline-primary:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

.btn-secondary {
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: var(--radius-xs) !important;
  font-size: 13px !important;
  transition: all .18s !important;
}
.btn-secondary:hover {
  background: #e2e8f0 !important;
  color: var(--text) !important;
}
.btn-outline-secondary {
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  background: var(--surface) !important;
  border-radius: var(--radius-xs) !important;
  font-size: 13px !important;
}
.btn-outline-secondary:hover {
  background: var(--surface-2) !important;
  color: var(--text) !important;
}

.btn-danger {
  background: var(--danger) !important;
  border: none !important;
  border-radius: var(--radius-xs) !important;
  color: #fff !important;
  font-size: 13px !important;
}
.btn-danger:hover { background: #dc2626 !important; color: #fff !important; }

.btn-success {
  background: var(--success) !important;
  border: none !important;
  border-radius: var(--radius-xs) !important;
  color: #fff !important;
}

.btn-group > .btn { border-radius: 0 !important; }
.btn-group > .btn:first-child { border-radius: var(--radius-xs) 0 0 var(--radius-xs) !important; }
.btn-group > .btn:last-child  { border-radius: 0 var(--radius-xs) var(--radius-xs) 0 !important; }
.btn-group > .btn:only-child  { border-radius: var(--radius-xs) !important; }

/* ─── FILE & FOLDER TABLE ──────────────────────────────── */
.tableblock {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  overflow: hidden !important;
}

.tableblock .table { 
  color: var(--text) !important; 
  margin-bottom: 0 !important; 
}
.tableblock .table > :not(caption) > * > * {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 12px 16px !important;
  vertical-align: middle !important;
}
.tableblock thead tr th {
  color: var(--text-muted) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 10px 16px !important;
}
.tableblock tbody tr:hover > * {
  background: #f8faff !important;
  color: var(--text) !important;
}

/* ─── FILE ICONS ───────────────────────────────────────── */
[class*="bi-file"] { color: var(--primary) !important; }
.bi-folder-fill, .bi-folder, .bi-folder2 { color: var(--warning) !important; }

/* ─── LIST GROUP ───────────────────────────────────────── */
.list-group-item {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  transition: all .15s !important;
  padding: 12px 16px !important;
}
.list-group-item:hover {
  background: var(--primary-light) !important;
  border-color: rgba(37,99,235,0.2) !important;
}
.list-group-item a { color: var(--text) !important; font-weight: 500 !important; }
.list-group-item a:hover { color: var(--primary) !important; }

/* ─── UPLOAD AREA ──────────────────────────────────────── */
.uploadarea { background: transparent !important; }

#upload_container {
  background: #f8fbff !important;
  border: 2px dashed #bfdbfe !important;
  border-radius: var(--radius) !important;
  padding: 18px !important;
  transition: all .2s !important;
}
#upload_container:hover {
  border-color: var(--primary) !important;
  background: var(--primary-light) !important;
}

/* ─── BREADCRUMBS ──────────────────────────────────────── */
nav[aria-label="breadcrumb"] { margin-bottom: 12px !important; }
.breadcrumb {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: 99px !important;
  padding: 7px 16px !important;
  margin-bottom: 0 !important;
  display: inline-flex !important;
  box-shadow: var(--shadow-sm) !important;
}
.breadcrumb-item a {
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}
.breadcrumb-item a:hover { color: var(--primary) !important; }
.breadcrumb-item.active { color: var(--text) !important; font-size: 13px !important; font-weight: 500 !important; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-light) !important; }

/* ─── DISK SPACE ───────────────────────────────────────── */
.progress {
  background: var(--border) !important;
  border-radius: 99px !important;
  height: 6px !important;
  overflow: hidden !important;
}
.progress-bar          { background: var(--primary) !important; border-radius: 99px !important; }
.progress-bar.bg-info  { background: var(--accent) !important; }
.progress-bar.bg-warning { background: var(--warning) !important; }
.progress-bar.bg-danger  { background: var(--danger) !important; }
.fullp .form-label { color: var(--text-muted) !important; font-size: 12px !important; }
.fullp .form-label .bi { color: var(--text-light) !important; }

/* ─── MODALS ───────────────────────────────────────────── */
.modal-content {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text) !important;
}
.modal-header {
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 16px 20px !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
}
.modal-title { font-weight: 600 !important; color: var(--text) !important; font-size: 1rem !important; }
.modal-body  { padding: 20px !important; color: var(--text) !important; }
.modal-footer {
  background: var(--surface-2) !important;
  border-top: 1px solid var(--border) !important;
  padding: 14px 20px !important;
  border-radius: 0 0 var(--radius) var(--radius) !important;
}
.btn-close { opacity: 0.5 !important; filter: none !important; }
.btn-close:hover { opacity: 1 !important; }
.modal-backdrop.show { opacity: 0.4 !important; }

/* ─── ALERTS ───────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm) !important; font-size: 13px !important; border-width: 1px !important; }
.alert-success { background: #f0fdf4 !important; border-color: #bbf7d0 !important; color: #166534 !important; }
.alert-danger  { background: #fef2f2 !important; border-color: #fecaca !important; color: #991b1b !important; }
.alert-warning { background: #fffbeb !important; border-color: #fde68a !important; color: #92400e !important; }
.alert-info    { background: #eff6ff !important; border-color: #bfdbfe !important; color: #1e40af !important; }

/* ─── BADGES ───────────────────────────────────────────── */
.badge { border-radius: 99px !important; font-weight: 500 !important; font-size: 11px !important; padding: 3px 9px !important; }
.bg-primary   { background: var(--primary) !important; }
.bg-secondary { background: var(--text-light) !important; }
.bg-success   { background: var(--success) !important; }
.bg-danger    { background: var(--danger) !important; }

/* ─── TABS / PILLS ─────────────────────────────────────── */
.nav-pills .nav-link {
  color: var(--text-muted) !important;
  border-radius: var(--radius-xs) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 8px 14px !important;
  transition: all .18s !important;
}
.nav-pills .nav-link.active {
  background: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.25) !important;
}
.nav-pills .nav-link:hover:not(.active) {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

/* ─── BACKGROUND UTILITIES ─────────────────────────────── */
.bg-light, .bg-light-lighter { background: var(--surface-2) !important; }
.bg-light-darker { background: #e2e8f0 !important; }
.bg-dark, .bg-dark-lighter { background: #1e293b !important; color: #fff !important; }

/* ─── FOOTER ───────────────────────────────────────────── */
.footer {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  font-size: 12.5px !important;
  padding: 18px 0 !important;
  margin-top: 40px !important;
  box-shadow: none !important;
}
.footer a { color: var(--text-muted) !important; }
.footer a:hover { color: var(--primary) !important; }

/* ─── BACK TO TOP ──────────────────────────────────────── */
.to-top {
  background: var(--primary) !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3) !important;
  color: #fff !important;
}

/* ─── AVATAR ───────────────────────────────────────────── */
.avatar {
  border-radius: 50% !important;
  border: 2px solid #e2e8f0 !important;
  width: 28px !important; height: 28px !important;
  object-fit: cover !important;
}
.avadefault {
  width: 28px !important; height: 28px !important;
  background: var(--primary) !important;
  border-radius: 50% !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* ─── PAGINATION ───────────────────────────────────────── */
.pagination .page-link {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  border-radius: var(--radius-xs) !important;
  margin: 0 2px !important;
  font-size: 13px !important;
  transition: all .15s !important;
}
.pagination .page-link:hover {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  border-color: rgba(37,99,235,0.3) !important;
}
.pagination .active .page-link {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37,99,235,0.3) !important;
}

/* ─── SECTION TITLE ────────────────────────────────────── */
.vfmblock { margin-bottom: 16px !important; }

/* ─── DRAG OVERLAY ─────────────────────────────────────── */
.overdrag {
  border: 2px dashed var(--primary) !important;
  border-radius: var(--radius) !important;
  background: rgba(37,99,235,0.05) !important;
}

/* ─── TEXT UTILS ───────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { color: var(--text) !important; }
.text-muted { color: var(--text-muted) !important; }
.small, small { color: var(--text-muted) !important; }

/* ─── GHOST / SECTION ──────────────────────────────────── */
.ghost {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

/* ─── ACTION BAR ───────────────────────────────────────── */
.action-group { gap: 6px; }

/* ─── SEARCH ───────────────────────────────────────────── */
#s-input { font-size: 15px !important; }

/* ─── LANGUAGE ─────────────────────────────────────────── */
.lang-menu .dropdown-item.active {
  background: var(--primary-light) !important;
  color: var(--primary) !important;
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 768px) {
  .card-body { padding: 16px !important; }
  #login-form { min-height: 50vh; padding: 12px; }
  .tableblock .table > :not(caption) > * > * { padding: 10px 12px !important; }
}