:root {
  --bg: #000000;
  --bg-deep: #050505;
  --card: rgba(10, 10, 10, 0.96);
  --card-soft: rgba(16, 16, 16, 0.94);

  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-soft: #d4d4d4;

  --primary: #ef3340;
  --primary-dark: #dc2626;
  --primary-soft: rgba(239, 51, 64, 0.14);
  --primary-border: rgba(239, 51, 64, 0.42);

  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;

  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(239, 51, 64, 0.4);

  --soft: rgba(239, 51, 64, 0.12);

  --white: #ffffff;
  --black: #000000;

  --shadow-dark: 0 30px 90px rgba(0, 0, 0, 0.78);
  --shadow-red: 0 0 70px rgba(239, 51, 64, 0.18);

  --radius: 2px;
}

/* ================= GLOBAL ================= */

* {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 0%, rgba(239, 51, 64, 0.22), transparent 22%),
    radial-gradient(circle at 50% 42%, rgba(239, 51, 64, 0.08), transparent 36%),
    linear-gradient(180deg, #000000 0%, #050505 48%, #000000 100%);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.55) 70%, #000000 100%),
    linear-gradient(rgba(239, 51, 64, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 51, 64, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  z-index: -1;
}

/* Removed background text completely */
body::after {
  content: none !important;
  display: none !important;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.055em;
}

h1 {
  font-size: clamp(30px, 4vw, 54px);
}

h2 {
  font-size: clamp(24px, 3vw, 36px);
}

h3 {
  font-size: 22px;
}

p {
  line-height: 1.6;
}

.muted {
  color: var(--muted) !important;
}

.mt {
  margin-top: 15px;
}

/* ================= NAVBAR ================= */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 46px;
  margin: 0 auto;
  padding: 0 16px;
  width: calc(100% - 32px);
  max-width: none;
  background: rgba(5, 5, 5, 0.96);
  color: var(--white);
  border-bottom: 1px solid rgba(239, 51, 64, 0.22);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.68),
    0 0 34px rgba(239, 51, 64, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.brand::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--primary);
  box-shadow: 0 0 16px rgba(239, 51, 64, 0.9);
}

.navlinks {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.navlinks span {
  margin-right: 8px;
  color: var(--muted);
  font-size: 12px;
  opacity: 0.9;
}

.navlinks a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  color: var(--white);
  background: transparent;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius);
  opacity: 0.88;
  transition: all 0.2s ease;
}

.navlinks a:hover,
.navlinks a.active {
  color: var(--white);
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  opacity: 1;
  box-shadow: 0 0 22px rgba(239, 51, 64, 0.34);
  text-decoration: none;
}

/* ================= LAYOUT ================= */

.container {
  width: calc(100% - 32px);
  max-width: none;
  margin: 28px auto;
  padding: 0;
}

.card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(239, 51, 64, 0.15), transparent 34%),
    rgba(10, 10, 10, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow:
    var(--shadow-dark),
    var(--shadow-red);
  margin-bottom: 18px;
  color: var(--text);
}

.card::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 24px;
  width: 3px;
  height: 44px;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(239, 51, 64, 0.85);
  opacity: 0.9;
}

.card > * {
  position: relative;
  z-index: 1;
}

.auth-card {
  max-width: 460px;
  margin: 70px auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-header h1 {
  margin-bottom: 8px;
}

.footer-note {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-top: 22px;
}

/* ================= GRID ================= */

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.col-12 {
  grid-column: span 12;
}

/* ================= STATS ================= */

.stat {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(239, 51, 64, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(17, 17, 17, 0.98), rgba(0, 0, 0, 0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--muted-soft);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}

.stat::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), transparent);
}

.stat strong {
  display: block;
  color: var(--white);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  margin-top: 10px;
  letter-spacing: -0.06em;
  text-shadow: 0 0 22px rgba(239, 51, 64, 0.28);
}

.small-strong {
  font-size: 22px !important;
  letter-spacing: -0.03em !important;
}

/* ================= FORMS ================= */

label {
  display: block;
  font-weight: 900;
  margin: 12px 0 6px;
  color: var(--muted-soft);
  font-size: 13px;
  letter-spacing: 0.03em;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  background: #080808;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #777777;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow:
    0 0 0 3px rgba(239, 51, 64, 0.15),
    0 0 28px rgba(239, 51, 64, 0.16);
  background: #000000;
}

textarea {
  min-height: 105px;
  resize: vertical;
}

/* ================= PROFESSIONAL DROPDOWN ================= */

select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  padding-right: 46px !important;
  cursor: pointer;
  background:
    linear-gradient(145deg, rgba(12, 12, 12, 0.98), rgba(0, 0, 0, 0.98)) !important;
}

select option,
select optgroup {
  background: #000000 !important;
  color: var(--white) !important;
  font-weight: 700;
}

.select-wrap {
  position: relative;
  width: 100%;
}

.select-wrap select {
  height: 46px;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  pointer-events: none;
  z-index: 3;
  border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: translateY(-65%) rotate(45deg);
  filter: drop-shadow(0 0 5px rgba(239, 51, 64, 0.85));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.select-wrap:hover::after {
  transform: translateY(-45%) rotate(45deg);
  filter: drop-shadow(0 0 9px rgba(239, 51, 64, 0.95));
}

.filter-form {
  display: grid;
  grid-template-columns: 1fr 220px auto auto;
  gap: 12px;
  align-items: end;
  margin-top: 18px;
}

/* ================= BUTTONS ================= */

.btn {
  border: 1px solid var(--primary-dark);
  background: var(--primary-dark);
  color: var(--white);
  padding: 11px 16px;
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 13px;
  transition: all 0.2s ease;
  box-shadow:
    0 18px 42px rgba(239, 51, 64, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow:
    0 24px 55px rgba(239, 51, 64, 0.38),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.btn.secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.btn.success {
  background: var(--success);
  border-color: var(--success);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.btn.warning {
  background: var(--warning);
  border-color: var(--warning);
  color: #111111;
}

.btn.small {
  padding: 7px 10px;
  font-size: 11px;
  border-radius: var(--radius);
  margin-top: 0;
  min-height: 31px;
}

.actions,
.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ================= TABLE ================= */

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(5, 5, 5, 0.96);
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
}

th,
td {
  padding: 14px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: rgba(239, 51, 64, 0.15);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:hover td {
  background: rgba(239, 51, 64, 0.055);
}

/* ================= BADGES ================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(239, 51, 64, 0.13);
  color: #fecaca;
  border: 1px solid rgba(239, 51, 64, 0.34);
}

.badge.approved,
.badge.completed {
  background: rgba(34, 197, 94, 0.14);
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.34);
}

.badge.pending,
.badge.in_progress {
  background: rgba(245, 158, 11, 0.14);
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.34);
}

.badge.rejected,
.badge.blocked {
  background: rgba(239, 68, 68, 0.14);
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.34);
}

.badge.not_submitted,
.badge.not_started,
.badge.on_hold {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e5e5;
  border-color: rgba(255, 255, 255, 0.14);
}

/* ================= FLASH ================= */

.flash {
  padding: 13px 15px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  border: 1px solid var(--border);
  font-weight: 800;
}

.flash.success {
  background: rgba(34, 197, 94, 0.14);
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.34);
}

.flash.danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.34);
}

.flash.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fef3c7;
  border-color: rgba(245, 158, 11, 0.34);
}

.flash.info {
  background: rgba(239, 51, 64, 0.13);
  color: #fecaca;
  border-color: rgba(239, 51, 64, 0.34);
}

/* ================= MEMBER SELECTION ================= */

.member-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  max-height: 320px;
  overflow-y: auto;
  background: #050505;
  margin-top: 10px;
}

.member-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  cursor: pointer;
  border-radius: var(--radius);
}

.member-row:hover {
  background: rgba(239, 51, 64, 0.07);
}

.member-row:last-child {
  border-bottom: 0;
}

.member-row input {
  width: auto;
  margin-top: 5px;
}

.member-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.member-row small {
  color: var(--muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-label input {
  width: auto;
}

/* ================= TASK DETAILS ADVANCED VIEW ================= */

.task-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  align-items: start;
}

.task-sidebar {
  position: sticky;
  top: 72px;
  background:
    radial-gradient(circle at 80% 0%, rgba(239, 51, 64, 0.16), transparent 34%),
    rgba(10, 10, 10, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-dark);
}

.sidebar-title {
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}

.task-content {
  min-width: 0;
}

.task-section {
  display: none;
}

.task-section.active {
  display: block;
}

.side-tab {
  width: 100%;
  display: block;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--white);
  font-weight: 800;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.side-tab:hover {
  color: var(--white);
  border-color: var(--primary-border);
  background: rgba(239, 51, 64, 0.14);
}

.side-tab.active {
  background: var(--primary-dark);
  color: var(--white);
  border-color: var(--primary-dark);
  box-shadow: 0 0 22px rgba(239, 51, 64, 0.28);
}

.section-line {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.timesheet-filter {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.timesheet-filter input {
  max-width: 240px;
}

.timesheet-output {
  background: #050505;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 14px;
}

/* ================= EMPTY STATE ================= */

.empty-state {
  padding: 22px;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(239, 51, 64, 0.08);
  border: 1px solid rgba(239, 51, 64, 0.22);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1000px) {
  .navbar {
    width: calc(100% - 24px);
    padding: 10px 14px;
    align-items: flex-start;
    flex-direction: column;
  }

  .navlinks {
    width: 100%;
  }

  .task-layout {
    grid-template-columns: 1fr;
  }

  .task-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .sidebar-title {
    grid-column: 1 / -1;
  }

  .side-tab {
    margin-bottom: 0;
    text-align: center;
  }

  .filter-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .container {
    width: calc(100% - 24px);
    margin: 18px auto;
    padding: 0;
  }

  .card {
    padding: 18px;
  }

  .grid {
    display: block;
  }

  .col-4,
  .col-6,
  .col-12 {
    margin-bottom: 14px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .timesheet-filter {
    display: block;
  }

  .timesheet-filter input {
    max-width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .navbar {
    width: calc(100% - 16px);
    margin: 0 auto;
    padding: 10px 12px;
  }

  .container {
    width: calc(100% - 16px);
    margin: 16px auto;
    padding: 0;
  }

  .navlinks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .navlinks span {
    grid-column: 1 / -1;
    margin: 0;
  }

  .navlinks a {
    width: 100%;
    min-height: 36px;
  }

  .task-sidebar {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 30px;
  }

  .btn,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .actions,
  .table-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .actions .btn,
  .table-actions .btn,
  .table-actions form,
  .table-actions button {
    width: 100%;
  }
}


button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ================= CUTE / SOFT HEADING UPDATE ================= */

h1,
h2,
h3 {
  font-weight: 750 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.18 !important;
}

h1 {
  font-size: clamp(24px, 2.6vw, 38px) !important;
}

h2 {
  font-size: clamp(20px, 2.1vw, 28px) !important;
}

h3 {
  font-size: 18px !important;
}

.page-header h1 {
  margin-bottom: 6px !important;
}

.card h1,
.card h2,
.card h3 {
  text-shadow: none !important;
}

.card {
  border-radius: 14px !important;
}

.card::before {
  width: 4px !important;
  height: 30px !important;
  border-radius: 999px !important;
}

.stat {
  border-radius: 14px !important;
  font-size: 11px !important;
  letter-spacing: 0.035em !important;
}

.stat strong {
  font-size: 26px !important;
  font-weight: 750 !important;
  letter-spacing: -0.025em !important;
  text-shadow: none !important;
}

.small-strong {
  font-size: 17px !important;
  font-weight: 750 !important;
}

.btn {
  border-radius: 12px !important;
  font-size: 12px !important;
  letter-spacing: 0.025em !important;
}

input,
select,
textarea {
  border-radius: 12px !important;
}

table {
  border-radius: 14px !important;
}

.badge {
  border-radius: 999px !important;
  font-size: 10px !important;
  letter-spacing: 0.025em !important;
}

.empty-state {
  border-radius: 14px !important;
}

/* Login / OTP page cute heading override */
.login-title,
.otp-title {
  font-size: clamp(30px, 4vw, 50px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.05 !important;
}

.advanced-login-card h1,
.advanced-otp-card h1 {
  font-size: 26px !important;
  font-weight: 750 !important;
  letter-spacing: -0.025em !important;
}

.login-badge,
.otp-badge {
  border-radius: 999px !important;
  font-size: 10px !important;
}

.login-feature,
.otp-feature,
.advanced-login-card,
.advanced-otp-card {
  border-radius: 22px !important;
}

.login-feature h3,
.otp-feature h3 {
  font-size: 13px !important;
  font-weight: 750 !important;
}

@media (max-width: 760px) {
  h1 {
    font-size: 24px !important;
  }

  h2 {
    font-size: 20px !important;
  }

  h3 {
    font-size: 17px !important;
  }

  .stat strong {
    font-size: 22px !important;
  }

  .small-strong {
    font-size: 16px !important;
  }

  .advanced-login-card h1,
  .advanced-otp-card h1 {
    font-size: 24px !important;
  }
}
