/* ----------------------------------------------------
   RadbooX Modern Management Suite Styles
   Exact Clone of https://my.radboox.com (MUI Theme v4.1.1)
------------------------------------------------------- */

:root {
  --primary: #2196f3;
  --primary-dark: #1976d2;
  --primary-light: #e3f2fd;
  --secondary: #673ab7;
  --success: #00e676;
  --success-dark: #00c853;
  --warning: #ffab00;
  --danger: #f44336;
  --dark: #121926;
  --sidebar-bg: #ffffff;
  --sidebar-text: #364152;
  --sidebar-hover: #ede7f6;
  --sidebar-active: #e3f2fd;
  --sidebar-active-text: #2196f3;
  --bg-main: #f4f6f8;
  --card-bg: #ffffff;
  --border-color: #e3e8ee;
  --text-primary: #121926;
  --text-secondary: #697586;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* App Wrapper */
.app-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 35px);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s ease;
  z-index: 1000;
}

.sidebar-brand {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2196f3, #1565c0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.35);
}

.sidebar-brand-name {
  font-size: 19px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.sidebar-brand-sub {
  font-size: 10px;
  font-weight: 700;
  color: #2196f3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-group-title {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px 6px 12px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 3px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item-left i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: #64748b;
  transition: color 0.15s;
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.nav-item:hover .nav-item-left i {
  color: var(--primary);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 700;
}

.nav-item.active .nav-item-left i {
  color: var(--sidebar-active-text);
}

.nav-sub-menu {
  padding-left: 36px;
  margin-bottom: 6px;
}

.nav-sub-item {
  display: block;
  padding: 7px 12px;
  border-radius: 6px;
  color: #64748b;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
}

.nav-sub-item:hover {
  color: var(--primary);
  background: #f8fafc;
}

.nav-sub-item.active {
  color: var(--primary);
  font-weight: 700;
  background: #eff6ff;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Main Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-main);
}

/* Topbar */
.topbar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 14px;
  width: 320px;
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.topbar-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.user-profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-chip:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2196f3;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.user-chip-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.user-chip-role {
  font-size: 10px;
  color: #64748b;
}

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

/* Announcement Banner */
.announcement-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.announcement-text {
  font-size: 13px;
  color: #92400e;
  line-height: 1.4;
}

.announcement-btn {
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

/* Cards & Grid */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.radboox-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 20px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  transition: transform 0.2s, box-shadow 0.2s;
}

.radboox-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

.card-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.card-icon-blue { background: #e0f2fe; color: #0284c7; }
.card-icon-green { background: #dcfce7; color: #16a34a; }
.card-icon-red { background: #fee2e2; color: #dc2626; }
.card-icon-amber { background: #fef3c7; color: #d97706; }
.card-icon-purple { background: #ede9fe; color: #7c3aed; }

.card-value {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.card-subtext {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Panels */
.panel {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  margin-bottom: 24px;
}

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

.panel-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  padding: 20px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.table tr:hover td {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info { background: #e0f2fe; color: #0369a1; }
.badge-primary { background: #eff6ff; color: #1d4ed8; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.25);
}

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

.btn-outline {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.15);
}

/* Terminal Box */
.terminal-box {
  background: #0f172a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 14px;
  border-radius: 8px;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 12px 0;
  line-height: 1.5;
  border: 1px solid #1e293b;
}

/* Login Screen */
.login-screen-wrapper {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f6;
  padding: 20px;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 36px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2196f3, #1565c0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.trial-quick-banner {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 20px;
}

.trial-quick-banner .title {
  font-size: 12px;
  font-weight: 800;
  color: #1e40af;
  margin-bottom: 6px;
}

.trial-quick-banner .details {
  font-size: 11px;
  color: #1e3a8a;
  line-height: 1.5;
}

.trial-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.trial-quick-btn:hover {
  background: #1d4ed8;
}

.btn-primary-block {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

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