/* =====================================
   MS GRAPHIC MAKER - CORE STYLE
   Clean, structured, scalable base CSS
===================================== */

:root {
  /* Brand Core */
  --brand-red: #9B1C1F;
  --brand-red-hover: #7f1619;
  --brand-red-soft: #f3d7d8;

  /* Neutrals */
  --black: #111111;
  --dark: #1a1a1a;
  --gray-900: #2a2a2a;
  --gray-700: #4b5563;
  --gray-300: #e5e7eb;
  --gray-100: #f4f6f9;
  --white: #ffffff;

  /* System */
  --primary: var(--black);
  --accent: var(--brand-red);

  --success: #15803d;
  --danger: #dc2626;

  --bg-light: var(--gray-100);
  --card-bg: var(--white);
  --border: var(--gray-300);

  --text-dark: var(--black);
  --text-muted: var(--gray-700);

  --radius: 14px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
}

/* =====================================
   Video Background (LOGIN ONLY)
   Add <body class="login-page"> in index.php
===================================== */

body.login-page {
  background: transparent !important;
}

body.login-page .video-bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: #000;
}

body.login-page .video-bg video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.login-page .overlay{
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(0,0,0,.55);
  pointer-events: none;
}

/* =====================================
   Layout Helpers
===================================== */

.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

.p-4 { padding: 24px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-3 { margin-bottom: 18px; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.flex {
  display: flex;
  gap: 12px;
  align-items: center;
}

.space-between {
  justify-content: space-between;
}

/* =====================================
   Typography
===================================== */

h1, h2, h3, h4 {
  font-weight: 600;
  margin-bottom: 12px;
}

p {
  color: var(--text-muted);
}

.small {
  font-size: 13px;
  color: var(--text-muted);
}

/* =====================================
   Card
===================================== */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

/* =====================================
   Buttons
===================================== */

.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(155, 28, 31, 0.35);
}

.btn-primary:hover {
  background: var(--brand-red-hover);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dark);
}

.btn-outline:hover {
  background: #f1f5f9;
}

/* =====================================
   Forms
===================================== */

label {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
  color: var(--text-dark);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px rgba(155, 28, 31, 0.15);
}

/* =====================================
   Alerts
===================================== */

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fde8e8;
  border: 1px solid #f5b5b6;
  color: var(--brand-red);
}

.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #065f46;
}

/* =====================================
   Navbar (Optional)
===================================== */

.navbar {
  background: var(--primary);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}

.navbar a:hover {
  opacity: 0.85;
}

/* =====================================
   Tables
===================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

th {
  background: #f1f1f1;
  font-weight: 600;
}

tr:hover {
  background: #fafafa;
}

.table-actions {
  display:flex;
  gap: 8px;
  justify-content: flex-end;
}

.table-actions a {
  font-size: 13px;
}

/* =====================================
   Admin Layout
===================================== */

.admin-wrap {
  display: flex;
  min-height: 100vh;
}

/* Sidebar with correct contrast */
.admin-side {
  width: 260px;
  background: #121212; /* not pure black */
  color: #ffffff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-side .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.admin-side .logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.admin-side .logo div div:first-child {
  font-weight: 600;
  font-size: 14px;
}

.admin-side .logo .small {
  color: #bdbdbd;
}

.admin-side .nav {
  margin-top: 10px;
}

.admin-side .nav a {
  display: block;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  color: #e5e5e5;
  transition: all 0.2s ease;
}

/* Hover */
.admin-side .nav a:hover {
  background: rgba(155, 28, 31, 0.15);
  color: #ffffff;
}

/* Active */
.admin-side .nav a.active {
  background: rgba(155, 28, 31, 0.25);
  border-left: 4px solid #9B1C1F;
  color: #ffffff;
  padding-left: 10px;
}

/* Main */
.admin-main {
  flex: 1;
  padding: 28px;
  background: var(--bg-light);
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff;
  border: 1px solid var(--border);
}
.admin-side .btn-outline{
  background: #9B1C1F;
  border: 1px solid #9B1C1F;
  color: #fff;
}

.admin-side .btn-outline:hover{
  background: #7f1619;
  border-color: #7f1619;
}
