/* backend/public/style/style.css */

/* style.css - Light Theme Version */
:root {
  --primary-bg: #f3f4f6;
  --card-bg: #ffffff;
  --dark-overlay: rgba(255, 255, 255, 0.8);

  --text-primary: #1f2937;
  --text-secondary: #6b7280;

  --border-color: #e5e7eb;

  --accent-color: #0099cc;
  --accent-color-light: #33b5e5;
  --accent-color-dark: #007399;

  --header-grad-start: #1e3a8a;
  --header-grad-end: #0099cc;

  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;

  --hover-bg: #f9fafb;

  /* Shared App Layout (centralised) */
  --card-bg-glass: rgba(255, 255, 255, 0.90);
  --card-border: rgba(148, 163, 184, 0.35);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-color: var(--primary-bg);
  background-image: none;
}

/* Background used across pages */
.app-bg{
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(59,130,246,0.18), transparent 60%),
    radial-gradient(900px 500px at 95% 10%, rgba(16,185,129,0.16), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(168,85,247,0.14), transparent 55%),
    linear-gradient(#f8fafc, #f6f7fb);
}

/* Container sizing */
.container { max-width: 1600px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px){ .container { padding: 0 24px; } }
@media (min-width: 1024px){ .container { padding: 0 32px; } }

/* Header */
.header {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(148,163,184,0.25);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner{
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text{
  color: rgb(15 23 42);
  letter-spacing: -0.02em;
}

/* Desktop nav */
.nav { display: flex; height: 70px; gap: 2px; align-items: center; }
.nav-item {
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  height: 42px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.15s ease-in-out;
}
.nav-item:hover {
  color: var(--accent-color);
  background-color: rgba(241,245,249,0.85);
  border-color: rgba(148,163,184,0.25);
}
.nav-item.active {
  color: rgb(15 23 42);
  background-color: rgba(226,232,240,0.7);
  border-color: rgba(148,163,184,0.35);
}

.logout-btn {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,0.35);
  border-radius: 12px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.9);
}
.logout-btn:hover {
  color: var(--danger-color);
  border-color: rgba(239,68,68,0.65);
  background-color: rgba(254,242,242,0.9);
}

/* Mobile nav visibility rules */
.mobile-only { display: none; }
.desktop-only { display: inline-flex; }

@media (max-width: 1024px){
  .mobile-only { display: inline-flex; }
  .desktop-only { display: none; }
}

/* HARD STOP on desktop: never show mobile drawer or hamburger even if .open exists */
@media (min-width: 1025px){
  .mobile-only { display: none !important; }
  .desktop-only { display: inline-flex !important; }

  .mobile-drawer { display: none !important; }
  .mobile-drawer.open { display: none !important; }
}

/* Mobile nav button */
.mobile-nav-btn{
  height: 42px;
  width: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(255,255,255,0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.mobile-nav-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(2,6,23,0.10);
}

/* Mobile nav drawer (overlay covers whole page, panel slides in) */
.mobile-drawer{
  position: fixed;
  inset: 0;
  z-index: 60;

  display: none;
  align-items: stretch;
  justify-content: flex-start;

  background: rgba(2,6,23,0.55);
  padding: 0;

  /* prevents “weird short overlay” if a parent layout does something odd */
  width: 100vw;
  height: 100vh;
}

.mobile-drawer.open{
  display: flex;
}

/* Sliding panel */
.mobile-drawer-panel{
  height: 100%;
  width: min(340px, 86vw);

  border-radius: 0;
  background: rgba(255,255,255,0.98);
  border-right: 1px solid rgba(148,163,184,0.30);
  box-shadow: 0 25px 60px rgba(2,6,23,0.35);

  overflow: hidden;
  display: flex;
  flex-direction: column;

  transform: translateX(-100%);
  transition: transform 180ms ease;
}

.mobile-drawer.open .mobile-drawer-panel{
  transform: translateX(0);
}

/* Optional: if you want a wider drawer on tablets, keep this */
@media (min-width: 768px) and (max-width: 1024px){
  .mobile-drawer-panel{ width: 360px; }
}

.mobile-drawer-head{
  padding: 16px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0.85));
}

.mobile-drawer-body{
  padding: 14px 16px 16px;
  overflow: auto;
  flex: 1 1 auto;
}

.mobile-drawer-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.25);
  background: rgba(248,250,252,0.75);
  text-decoration: none;
  color: rgb(30 41 59);
  font-weight: 700;
  margin-bottom: 10px;
}
.mobile-drawer-link.active{
  border-color: rgba(59,130,246,0.40);
  box-shadow: 0 10px 18px rgba(2,6,23,0.08);
}

/* Breadcrumb */
.breadcrumb {
  margin-top: 14px;
  color: rgb(100 116 139);
  padding-left: 4px;
  font-size: 14px;
}
.breadcrumb a { color: rgb(59 130 246); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Inputs */
.toolbar input,
.toolbar select,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="search"],
select,
textarea {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-primary);
  background-color: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: #9ca3af; }
input:focus, select:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 153, 204, 0.18);
}

/* Reusable app input (use across pages and modals) */
.app-input{
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.35);
  padding: 0 12px;
  background: #ffffff;
  outline: none;
  font-size: 14px;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.app-input:focus{
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(0, 153, 204, 0.18);
}

/* Fix select vertical alignment (eg "Unassigned") */
select.app-input{
  line-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

/* Buttons */
.btn-primary, .btn-login {
  margin-top: 10px;
  width: auto;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.12s;
  background-color: var(--accent-color);
  color: #ffffff;
  border: none;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 18px rgba(2,6,23,0.12);
}
.btn-primary:hover, .btn-login:hover {
  background-color: var(--accent-color-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(2,6,23,0.16);
}
.btn-primary:disabled {
  background-color: #cbd5e1;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* App cards */
.content-card{
  background: var(--card-bg-glass);
  border: 1px solid var(--card-border);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(8px);
  overflow: hidden;
  border-radius: 1rem;
}

/* Card header strip */
.card-head,
.page-header,
.card-header{
  padding: 18px 22px;
  border-bottom: 1px solid rgba(148,163,184,0.25);
  background: linear-gradient(to bottom, rgba(255,255,255,0.92), rgba(255,255,255,0.65));
}

/* Page header titles inside cards */
.page-title{
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgb(15 23 42);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}
.page-subtitle{
  margin-top: 6px;
  color: rgb(100 116 139);
}

/* Tables */
.table-wrap{ overflow-x: auto; padding: 18px 22px 22px; }
.table-wrap::-webkit-scrollbar{ height: 10px; }
.table-wrap::-webkit-scrollbar-thumb{ background: rgba(148,163,184,0.55); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-track{ background: rgba(226,232,240,0.6); border-radius: 999px; }

.table-ui{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.30);
  background: rgba(255,255,255,0.70);
  min-width: 900px;
}
.table-ui thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248,250,252,0.95);
  color: rgb(51 65 85);
  font-weight: 700;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(148,163,184,0.25);
  white-space: nowrap;
}
.table-ui tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(148,163,184,0.18);
  color: rgb(30 41 59);
  white-space: nowrap;
}
.table-ui tbody tr:hover{ background: rgba(241,245,249,0.75); }

/* Mobile cards for tables */
.table-cards{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.table-card{
  border: 1px solid rgba(148,163,184,0.30);
  background: rgba(255,255,255,0.80);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 18px rgba(2,6,23,0.06);
}
.table-card-title{
  font-weight: 800;
  letter-spacing: -0.02em;
  color: rgb(15 23 42);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.table-card-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.kv{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.kv .k{
  color: rgb(100 116 139);
  font-size: 0.85rem;
  font-weight: 700;
}
.kv .v{
  color: rgb(30 41 59);
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

/* Modals base */
.modal-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(2,6,23,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal{
  width: 100%;
  max-width: 760px;
  border-radius: 18px;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(148,163,184,0.30);
  box-shadow: 0 25px 60px rgba(2,6,23,0.35);
  overflow: hidden;
}
.modal-header{
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148,163,184,0.25);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0.85));
}
.modal-body{ padding: 18px; }
.modal-footer{
  padding: 16px 18px;
  border-top: 1px solid rgba(148,163,184,0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(248,250,252,0.7);
}

/* Login */
.btn-login { width: 100%; }

/* Icons */
i.fa-solid, i.fa-regular, i.fa-brands{
  display: inline-block;
  width: 1.1em;
  text-align: center;
}