/* public/css/smsghana.css */

/* Theme tokens */
:root {
  --bg-body: #0b1020;
  --bg-card: #020617;
  --bg-sidebar: #020617;
  --bg-topbar: #020617;
  --bg-chip: #111827;
  --bg-nav-active: #111827;

  --border-subtle: #111827;
  --border-input: #374151;

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-soft: #cbd5f5;
  --text-sidebar-sub: #6b7280;

  --accent-start: #4f46e5;
  --accent-end: #22c55e;

  --hero-gradient: radial-gradient(
    circle at top,
    #111827 0,
    #020617 40%,
    #020617 100%
  );
}

/* Light theme overrides */
:root[data-theme="light"] {
  --bg-body: #f3f4f6;
  --bg-card: #ffffff;
  --bg-sidebar: #f9fafb;
  --bg-topbar: #ffffff;
  --bg-chip: #e5e7eb;
  --bg-nav-active: #e5e7eb;

  --border-subtle: #e5e7eb;
  --border-input: #cbd5e1;

  --text-main: #111827;
  --text-muted: #6b7280;
  --text-soft: #4b5563;
  --text-sidebar-sub: #9ca3af;

  --hero-gradient: radial-gradient(
    circle at top,
    #ffffff 0,
    #e5e7eb 40%,
    #f3f4f6 100%
  );
}

/* Base reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
}

/* Landing layout */

.landing-body {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
}

.theme-toggle {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 20;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-input);
  background: var(--bg-chip);
  color: var(--text-main);
  font-size: 0.85rem;
  cursor: pointer;
}

.landing-layout {
  max-width: 1100px;
  width: 100%;
  margin: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2rem;
}

.landing-hero h1 {
  font-size: 2.3rem;
  margin-bottom: 0.75rem;
}

.hero-sub {
  color: var(--text-soft);
  margin-bottom: 1.25rem;
}

.hero-points {
  padding-left: 1.25rem;
  color: var(--text-main);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--text-main);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

/* Auth card */

.landing-auth {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
  width: 100%;
  border: 1px solid var(--border-subtle);
}

:root[data-theme="light"] .auth-card {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.auth-sub {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.9rem;
  font-size: 0.9rem;
}

.field span {
  color: var(--text-main);
}

.field input {
  padding: 0.55rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-input);
  background: var(--bg-body);
  color: var(--text-main);
}

.btn-primary {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  color: white;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover {
  opacity: 0.95;
}

.auth-hint {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 0.9rem;
  color: var(--text-muted);
}

.auth-hint a {
  color: #a5b4fc;
}

.error-text {
  margin-top: 0.75rem;
  color: #fecaca;
  font-size: 0.85rem;
}

/* App shell */

.app-body {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.5rem 0.5rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.brand-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.brand-sub {
  font-size: 0.8rem;
  color: var(--text-sidebar-sub);
}

.sidebar-nav {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-link.active {
  background: var(--bg-nav-active);
  color: #a5b4fc;
}

.nav-section-label {
  margin-top: 0.9rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-sidebar-sub);
}

.app-main {
  background: var(--hero-gradient);
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-topbar);
}
.school-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.school-logo {
  width: 32px;
  height: 32px;
  border-radius: 0.75rem;
  background-color: var(--bg-chip);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.school-header-text h1 {
  margin: 0 0 0.15rem;
}

.school-header-text .topbar-sub {
  margin: 0;
}

.app-main-inner {
  padding: 1.25rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-chip);
  font-size: 0.8rem;
  color: var(--text-main);
}

.btn-ghost {
  margin-left: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-input);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.8rem;
}

.card {
  background: var(--bg-card);
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] .card {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1rem;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.simple-list {
  padding-left: 1.2rem;
  font-size: 0.9rem;
}

.code-block {
  background: var(--bg-body);
  border-radius: 0.6rem;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

/* Mobile tweaks */
@media (max-width: 900px) {
  .landing-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
.mm-credit {
  margin-top: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid #c8102e; /* small red frame */
  background: rgba(15, 23, 42, 0.18);
}

:root[data-theme="light"] .mm-credit {
  background: #f9fafb;
  border-color: #e5e7eb;
}

.mm-credit-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}

.mm-credit-text {
  display: flex;
  flex-direction: column;
}

.mm-credit-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.mm-credit-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mm-credit-sub span {
  font-weight: 500;
}
/* Simple table + HR styles */

.table-wrapper {
  margin-top: 0.75rem;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead {
  background: rgba(15, 23, 42, 0.8);
}

:root[data-theme="light"] .data-table thead {
  background: #f3f4f6;
}

.data-table th,
.data-table td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.data-table th {
  font-weight: 600;
}

.data-table tbody tr:hover {
  background: rgba(15, 23, 42, 0.4);
}

:root[data-theme="light"] .data-table tbody tr:hover {
  background: #f9fafb;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.hr-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-compact {
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border-input);
  background: var(--bg-body);
  color: var(--text-main);
  font-size: 0.8rem;
}

.btn-ghost-small {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-input);
  background: transparent;
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-ghost-small:hover {
  background: var(--bg-chip);
}

.staff-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.staff-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.small-text {
  font-size: 0.75rem;
}

/* Status pills */

.pill-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid var(--border-subtle);
}

.pill-status.active {
  background: rgba(22, 163, 74, 0.15);
  border-color: #16a34a;
}

.pill-status.leave {
  background: rgba(245, 158, 11, 0.12);
  border-color: #f59e0b;
}

.pill-status.inactive {
  background: rgba(148, 163, 184, 0.12);
  border-color: #64748b;
}

/* Badge for employment type */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  background: var(--bg-chip);
  color: var(--text-main);
}
/* Staff directory cards */

.staff-directory {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
}

.staff-card {
  background: var(--bg-card);
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.7rem;
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.staff-card-photo {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.staff-card-photo.has-photo {
  background: transparent;
  overflow: hidden;
}

.staff-card-photo.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.staff-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.staff-card-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.staff-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.staff-card-contact {
  margin-top: 0.15rem;
}

/* staff-avatar with photo in the table */

.staff-avatar.has-photo {
  padding: 0;
  overflow: hidden;
}

.staff-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ============================================================
   HR MODULE — BASIC LAYOUT (PART 1)
============================================================ */

.hr-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 80px);
  gap: 16px;
  padding: 16px;
}

.hr-staff-list {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  overflow-y: auto;
}

.hr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#hr-search {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.hr-list {
  margin-top: 20px;
}

.hr-profile-panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  overflow-y: auto;
}

.hr-placeholder {
  text-align: center;
  opacity: 0.6;
  padding-top: 80px;
}
/* ============================================================
   HR MODULE — STAFF DIRECTORY
============================================================ */

.hr-staff-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.hr-staff-card:hover {
  background: #f9fafb;
}

.hr-staff-photo {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.hr-staff-info h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.hr-staff-info p {
  margin: 4px 0 6px;
  color: #6b7280;
  font-size: 13px;
}

.tag {
  background: #eef2ff;
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 12px;
}
/* ============================================================
   HR MODULE — PROFILE PANEL
============================================================ */

.hr-profile-header {
  display: flex;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.hr-profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
}

.hr-profile-basic h2 {
  margin: 0;
  font-size: 22px;
}

#hr-upload-photo {
  margin-top: 12px;
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.hr-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.hr-tab {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
}

.hr-tab.active {
  background: #2563eb;
  color: #fff;
}

.hr-section {
  margin-bottom: 20px;
}

.hr-section h3 {
  margin-bottom: 10px;
  font-size: 17px;
}
/* ============================================================
   HR MODULE — ATTENDANCE TAB
============================================================ */

.att-header {
  display: flex;
  gap: 12px;
  margin-bottom: 15px;
}

.att-header select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.att-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.att-day {
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.att-present {
  background: #d1fae5;
  border-color: #10b981;
}

.att-absent {
  background: #fee2e2;
  border-color: #ef4444;
}

.att-leave {
  background: #fef3c7;
  border-color: #f59e0b;
}
/* ============================================================
   HR MODULE — LEAVE TAB
============================================================ */

.leave-actions {
  margin-bottom: 15px;
}

#leave-request-btn {
  padding: 8px 14px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.leave-card {
  border: 1px solid #e5e7eb;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  background: #fff;
}

.leave-status {
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
}

.leave-pending {
  background: #fef3c7;
  color: #92400e;
}

.leave-approved {
  background: #d1fae5;
  color: #065f46;
}

.leave-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.leave-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leave-form input,
.leave-form select,
.leave-form textarea {
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.leave-form button {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

#lv-submit {
  background: #16a34a;
  color: white;
}

#lv-cancel {
  background: #e5e7eb;
}
/* ============================================================
   HR MODULE — CONTRACT TAB
============================================================ */

.contract-section input {
  display: block;
  margin-bottom: 10px;
  padding: 8px;
  width: 250px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

#ct-upload-btn {
  padding: 10px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
}

.contract-link {
  display: inline-block;
  padding: 8px 12px;
  background: #e0f2fe;
  color: #0369a1;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 8px;
}
