/* assets/admin_corporate.css
   Corporate Admin UI (safe override)
   Works with PHP 7.2 (CSS only)
*/

:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:rgba(15,23,42,.10);
  --shadow:0 10px 30px rgba(2,8,23,.08);
  --brand:#0d6efd;
  --brand2:#1d4ed8;
  --danger:#dc2626;
  --warn:#f59e0b;
  --success:#16a34a;
}

html,body{height:100%;}
body{
  margin:0;
  background:var(--bg) !important;
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  line-height:1.35;
}

a{color:var(--brand); text-decoration:none;}
a:hover{text-decoration:underline;}

img{max-width:100%; height:auto;}

hr{border:0; border-top:1px solid var(--border); margin:14px 0;}

.container,
.wrap,
.page,
.content{
  max-width:1200px;
  margin:0 auto;
  padding:18px;
}

/* ===== NAV / HEADER (fallback, even if HTML is simple) ===== */
header, .topbar, .navbar, .admin-top{
  background:rgba(255,255,255,.92);
  border-bottom:1px solid var(--border);
  backdrop-filter:saturate(180%) blur(12px);
}

/* ===== CARD STYLE ===== */
.card, .box, .panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
}

.card{padding:16px;}
.card h1,.card h2,.card h3{margin-top:0}

/* ===== TYPO ===== */
h1{font-size:22px; letter-spacing:-.4px;}
h2{font-size:18px; letter-spacing:-.2px;}
.small, .muted, .help, .hint{
  color:var(--muted);
  font-size:12px;
}

/* ===== FORM ===== */
input[type="text"], input[type="number"], input[type="date"], input[type="email"],
input[type="password"], select, textarea{
  width:auto;
  max-width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  outline:none;
  font:inherit;
}

textarea{min-height:90px; width:min(520px, 100%);}

input:focus, select:focus, textarea:focus{
  border-color:rgba(13,110,253,.45);
  box-shadow:0 0 0 .2rem rgba(13,110,253,.12);
}

label{font-weight:600; font-size:12px; color:var(--muted);}

button, .btn, input[type="submit"]{
  appearance:none;
  border:1px solid var(--border);
  background:#fff;
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}

button:hover, .btn:hover, input[type="submit"]:hover{
  background:rgba(13,110,253,.05);
  border-color:rgba(13,110,253,.18);
}

.btn-primary, .primary{
  background:var(--brand);
  color:#fff !important;
  border-color:rgba(13,110,253,.35);
}
.btn-primary:hover, .primary:hover{background:var(--brand2);}

.btn-danger, .danger{
  background:var(--danger);
  color:#fff !important;
  border-color:rgba(220,38,38,.35);
}
.btn-danger:hover, .danger:hover{filter:brightness(.95);}

.btn-warning, .warning{
  background:var(--warn);
  color:#111827 !important;
  border-color:rgba(245,158,11,.35);
}

.btn-success, .success{
  background:var(--success);
  color:#fff !important;
  border-color:rgba(22,163,74,.35);
}

/* Approval buttons on tables */
button[style*="background"], .aksi button{
  border-radius:10px !important;
}

/* ===== TABLE ===== */
table{
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
}

thead th{
  background:rgba(15,23,42,.03);
  color:#0f172a;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  border-bottom:1px solid var(--border);
  padding:10px 12px;
  text-align:left;
}

tbody td{
  padding:10px 12px;
  border-bottom:1px solid rgba(15,23,42,.06);
  vertical-align:top;
}

tbody tr:hover{
  background:rgba(13,110,253,.03);
}

tbody tr:last-child td{border-bottom:0;}

/* make long pages readable */
table + table{margin-top:14px;}
.table-wrap{overflow:auto;}

/* ===== STATUS BADGE ===== */
.badge, .status, .pill{
  display:inline-block;
  font-size:12px;
  padding:.25rem .55rem;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(15,23,42,.03);
}

.badge.pending, .status.pending{background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.25);}
.badge.approved, .status.approved{background:rgba(22,163,74,.12); border-color:rgba(22,163,74,.25);}
.badge.rejected, .status.rejected{background:rgba(220,38,38,.12); border-color:rgba(220,38,38,.25);}

/* ===== LINKS ROW (export links etc) ===== */
a[href*="export"], .export a{
  display:inline-block;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  margin-right:6px;
}
a[href*="export"]:hover{background:rgba(13,110,253,.05);}

/* ===== SIDEBAR MENU (fallback) ===== */
.sidebar, .sidenav, nav{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow);
  padding:12px;
}
.sidebar a, nav a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  color:var(--text);
}
.sidebar a:hover, nav a:hover{
  background:rgba(13,110,253,.06);
  text-decoration:none;
}

/* ===== MOBILE FIX ===== */
@media(max-width: 768px){
  .container,.wrap,.page,.content{padding:12px;}
  table{font-size:13px;}
  input,select,textarea{width:100%;}
}