/* =======================================
   Nexor System-Wide UI Stylesheet
   For: Digital POS / Business Suite
   ======================================= */

/* ---------- ROOT THEME ---------- */
:root {
  --nexor-bg: #0a0e17;
  --nexor-card: rgba(255, 255, 255, 0.04);
  --nexor-border: rgba(255, 255, 255, 0.08);
  --nexor-text: #e6eaf5;
  --nexor-text-muted: #a5b1cc;
  --nexor-primary: #00b4d8;
  --nexor-secondary: #ff6f00;
  --nexor-danger: #ff4d4d;
  --nexor-success: #00c851;
  --nexor-warning: #ffc107;
  --nexor-font: "Poppins", "Segoe UI", sans-serif;
  --radius-lg: 18px;
  --radius-md: 10px;
  --transition: 0.3s ease;
}

/* ---------- GLOBAL RESET ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  background: url("../images/dashboard-bg.jpg") no-repeat center center fixed,
              linear-gradient(135deg, #0b0f19, #1e2746);
  background-size: cover;
  font-family: var(--nexor-font);
  color: var(--nexor-text);
  scroll-behavior: smooth;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: -1;
}

/* ---------- HEADER & NAV ---------- */
.nexor-header {
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--nexor-border);
  padding: 12px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nexor-header h1 {
  font-size: 1.3rem;
  color: var(--nexor-primary);
  font-weight: 700;
}

.nexor-user {
  font-size: 0.95rem;
  color: var(--nexor-text-muted);
}

/* ---------- DASHBOARD CONTAINER ---------- */
.dashboard-container {
  width: 95%;
  max-width: 1400px;
  margin: 100px auto 50px;
  background: var(--nexor-card);
  border: 1px solid var(--nexor-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  padding: 40px 50px;
  backdrop-filter: blur(12px);
  animation: fadeIn 0.6s ease-in-out;
}

/* ---------- TYPOGRAPHY ---------- */
h2 {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 35px;
  position: relative;
}

h2::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, var(--nexor-primary), var(--nexor-secondary));
  border-radius: 2px;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--nexor-primary), var(--nexor-secondary));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.btn-danger {
  background: var(--nexor-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #e63939;
}

.btn-success {
  background: var(--nexor-success);
  color: #fff;
}

/* ---------- TABLES ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

thead {
  background: linear-gradient(90deg, var(--nexor-primary), var(--nexor-secondary));
}

th, td {
  padding: 14px 18px;
  text-align: left;
}

th {
  font-weight: 700;
  color: #fff;
}

td {
  color: var(--nexor-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
}

.actions a {
  font-weight: 600;
  margin-right: 12px;
  text-decoration: none;
  transition: var(--transition);
}

.actions a.edit { color: var(--nexor-primary); }
.actions a.delete { color: var(--nexor-danger); }
.actions a.edit:hover { color: #0090c8; }
.actions a.delete:hover { color: #e63939; }

/* ---------- FORMS ---------- */
.nexor-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--nexor-card);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--nexor-border);
}

.nexor-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--nexor-text-muted);
  font-weight: 600;
}

.nexor-form input,
.nexor-form select,
.nexor-form textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.08);
  color: #fff;
  margin-bottom: 18px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nexor-form input:focus,
.nexor-form select:focus,
.nexor-form textarea:focus {
  outline: none;
  border-color: var(--nexor-primary);
  box-shadow: 0 0 6px var(--nexor-primary);
}

/* ---------- TOASTS ---------- */
#toast {
  position: fixed;
  top: 25px;
  right: 25px;
  min-width: 260px;
  padding: 14px 20px;
  border-radius: 10px;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
  display: none;
  z-index: 999;
}

#toast.success { background: var(--nexor-success); }
#toast.error { background: var(--nexor-danger); }
#toast.warning { background: var(--nexor-warning); }

/* ---------- PAGINATION ---------- */
.pagination {
  text-align: center;
  margin-top: 25px;
}

.pagination a {
  color: #ccc;
  margin: 0 6px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.pagination a:hover { color: #fff; }
.pagination a.active {
  color: var(--nexor-secondary);
  text-decoration: underline;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .dashboard-container { padding: 30px 25px; }
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { display: none; }
  tbody tr {
    margin-bottom: 15px;
    background: rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 10px;
  }
  td {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
  }
  td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--nexor-primary);
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
