:root {
  --primary-blue: #6B1D25;
  --primary-blue-dark: #280B0F;
  --accent-green: #F58020;
  --accent-green-hover: #E06D10;
  --bg-main: #F4F8FA;
  --card-bg: #FFFFFF;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
}

/* Overlays & Modals */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.auth-card {
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.logo-box {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.logo-box .material-icons-round {
  font-size: 36px;
}

.auth-card h2 {
  font-size: 24px;
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.input-group {
  position: relative;
  margin-bottom: 16px;
}

.input-group .material-icons-round {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-group input {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-blue-dark);
}

.btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #F1F5F9;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 50%;
}

.btn-icon:hover {
  background: #E2E8F0;
  color: var(--text-dark);
}

.error-msg {
  color: #E11D48;
  font-size: 13px;
  margin-top: 12px;
}

/* Layout */
#app-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: #0F172A;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.mini-logo {
  width: 40px;
  height: 40px;
  background: var(--primary-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-title {
  font-size: 16px;
  font-weight: 700;
}

.badge {
  font-size: 10px;
  background: rgba(255,255,255,0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #94A3B8;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #94A3B8;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: white;
}

.nav-item.active {
  background: var(--primary-blue);
  color: white;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94A3B8;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  padding: 8px 14px;
  border-radius: 20px;
  width: 320px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 100%;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.content-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.tab-page {
  display: none;
}

.tab-page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.counter-pill {
  background: #E2E8F0;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Data Table */
.table-card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th, .data-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background: #F8FAFC;
  font-weight: 600;
  color: var(--text-muted);
}

.data-table tr:hover {
  background: #F8FAFC;
}

.table-img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

/* Category Grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.category-card {
  background: white;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-title {
  font-weight: 600;
  font-size: 16px;
}

.category-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Modal and Phone Preview */
.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 90vw;
  max-width: 960px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-body-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* Phone Mockup */
.preview-title-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.preview-lang-switch {
  display: flex;
  background: var(--bg-main);
  border-radius: 8px;
  padding: 2px;
  margin-bottom: 12px;
}

.preview-lang-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text-muted);
}

.preview-lang-btn.active {
  background: white;
  color: var(--primary-blue);
  box-shadow: var(--shadow-sm);
}

.phone-mockup {
  width: 280px;
  height: 520px;
  background: #090D16;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  border: 4px solid #1E293B;
  margin: 0 auto;
}

.phone-screen {
  background: #121824;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-notch {
  width: 90px;
  height: 16px;
  background: #090D16;
  border-radius: 0 0 10px 10px;
  margin: 0 auto;
}

.phone-header {
  height: 44px;
  background: #1565C0;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.phone-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.phone-card {
  background: #1E2638;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.phone-card-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.phone-card-body {
  padding: 12px;
}

.phone-card-category {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-green);
  text-transform: uppercase;
}

.phone-card-title {
  font-size: 14px;
  color: white;
  margin: 4px 0 8px;
}

.phone-card-desc {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.4;
}

.settings-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.settings-card h3 {
  margin-bottom: 12px;
}

.settings-card p {
  margin-bottom: 8px;
  font-size: 14px;
}
