/* ==========================================================================
   XCapeNet Module Theme (Based on main style.css)
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Solo Layout Variables Mapping */
  --solo-bg-primary: #0f0f23;
  --solo-bg-secondary: rgba(15, 15, 35, 0.95);
  --solo-card: rgba(255, 255, 255, 0.1);
  --solo-border: rgba(0, 212, 255, 0.2);
  --solo-border-light: rgba(0, 212, 255, 0.1);
  --solo-accent-primary: #00d4ff;
  --solo-accent-secondary: #0099cc;
  --solo-text-primary: #ffffff;
  --solo-text-secondary: rgba(255, 255, 255, 0.8);
  --solo-hover: rgba(0, 212, 255, 0.1);
  --solo-input: rgba(255, 255, 255, 0.1);
  --solo-shadow-1: 0 4px 20px rgba(0, 212, 255, 0.05);
  --solo-shadow-2: 0 10px 30px rgba(0, 212, 255, 0.2);
  --solo-accent-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  --solo-page-width: 1160px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

/* Base Body */
.m2-body,
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Typography */
.m2-body h1,
.m2-body h2,
.m2-body h3,
body h1,
body h2,
body h3 {
  color: #ffffff;
  margin: 0 0 1rem 0;
}

.m2-body h1,
body h1 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.m2-body h2,
body h2 {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
}

.m2-body a,
body a {
  color: #00d4ff;
  text-decoration: none;
  transition: all 0.3s;
}

.m2-body a:hover,
body a:hover {
  color: #ffffff;
  text-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.m2-muted,
.muted {
  color: rgba(255, 255, 255, 0.7);
}

/* Layout Shells */
.m2-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.m2-content-wrap {
  padding: 20px;
  max-width: 1240px;
  margin: 0 auto;
}

.m2-content {
  margin-top: 14px;
}

/* Sidebar (m2 & Solo) */
.m2-sidebar,
.solo-layout .sidebar {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(0, 212, 255, 0.2);
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}

.m2-sidebar {
  padding: 26px 18px 22px;
}

/* Topbar & Header */
.m2-topbar,
.m2-masthead {
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.05);
}

.m2-masthead {
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
}

.m2-topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: #00d4ff;
}

.m2-topbar-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* Cards & Containers */
.m2-card,
.card,
.m2-auth-main,
.m2-auth-side,
.m2-tariff-item,
.inner,
.m2-app-card,
.solo-layout .sidebar-section {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  transition: all 0.3s;
}

.m2-card:hover,
.card:hover,
.m2-app-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

/* Grids & Structural */
.m2-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.m2-grid-2,
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.m2-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.m2-auth-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 16px;
}

.m2-auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
}

.m2-form-grid {
  display: grid;
  gap: 12px;
}

.m2-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

/* Buttons & Actions */
.m2-actions,
.m2-actions-wrap,
.m2-chip-row,
.m2-inline-form,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.m2-btn,
.btn,
button,
input[type="submit"] {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  color: #fff;
  border: 2px solid transparent;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
  transition: all 0.3s;
}

.m2-btn:hover,
.btn:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 212, 255, 0.4);
}

.m2-btn-ghost,
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.3);
  box-shadow: none;
}

.m2-btn-ghost:hover,
.btn-secondary:hover {
  background: #00d4ff;
  color: #0f0f23;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.m2-btn-danger,
.btn-danger {
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.3);
  box-shadow: none;
}

/* Nav Links & Chips */
.m2-nav-link,
.m2-sidebar-logout,
.m2-chip-link,
.top-link,
.m2-platform-tab,
.m2-app-btn,
.solo-layout .sidebar-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 12px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
  font-weight: 500;
  cursor: pointer;
}

.m2-nav-link:hover,
.m2-chip-link:hover,
.top-link:hover,
.m2-platform-tab:hover,
.solo-layout .sidebar-btn:hover {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
}

.m2-nav-link.is-active,
.m2-chip-link.is-active,
.top-link.is-active,
.m2-platform-tab.is-active,
.solo-layout .sidebar-btn.active {
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
  color: white;
}

.m2-sidebar-logout {
  border-color: rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

.m2-sidebar-logout:hover {
  background: rgba(255, 68, 68, 0.1);
}

/* Forms & Inputs */
.m2-input,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea,
.admin-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: inherit;
  transition: all 0.3s;
}

.m2-input:focus,
input:focus,
select:focus,
textarea:focus,
.admin-input:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Notices, Pills & Metrics */
.m2-notice,
.notice {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
}

.m2-success,
.notice.success {
  background: rgba(0, 255, 136, 0.1);
  border-color: rgba(0, 255, 136, 0.3);
  color: #00ff88;
}

.m2-error,
.notice.error {
  background: rgba(255, 68, 68, 0.1);
  border-color: rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

.m2-kpi-pill,
.m2-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #00d4ff;
  font-size: 12px;
}

.m2-kicker {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  text-transform: uppercase;
}

.m2-metric {
  font-size: 28px;
  font-weight: 700;
  color: #00d4ff;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
  margin-top: 10px;
}

/* Tables */
.m2-table-wrap,
.table-container {
  overflow: auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px;
}

.m2-table,
table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.m2-table th,
.m2-table td,
th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  text-align: left;
}

.m2-table th,
th {
  color: #00d4ff;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.m2-table tr:hover td {
  background: rgba(0, 212, 255, 0.05);
}

/* Toasts */
.wc-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: grid;
  gap: 10px;
}

.wc-toast {
  padding: 1rem 1.5rem;
  border-radius: 8px;
  background: rgba(15, 15, 35, 0.95);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.wc-toast-success {
  border-color: #00ff88;
  color: #00ff88;
}

.wc-toast-error {
  border-color: #ff4444;
  color: #ff4444;
}

/* Solo Layout Specifics */
.solo-layout {
  display: block;
  min-height: 100vh;
}

.solo-layout .content {
  margin-left: 272px;
  padding: 20px;
}

.solo-layout .sidebar {
  width: 272px;
  z-index: 70;
}

.solo-layout .sidebar-section-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Utils */
.m2-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.m2-props p {
  border-bottom: 1px solid rgba(0, 212, 255, 0.1);
  padding: 8px 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
}

.mt16 {
  margin-top: 16px;
}

/* Responsive Adjustments */
@media (max-width: 1100px) {
  .m2-shell {
    grid-template-columns: 1fr;
  }

  .m2-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  }
}

@media (max-width: 900px) {

  .m2-grid-3,
  .m2-grid-2,
  .m2-auth-grid,
  .grid.two,
  .m2-auth-layout {
    grid-template-columns: 1fr;
  }

  .solo-layout .content {
    margin-left: 0;
  }

  .solo-layout .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .solo-layout .sidebar.is-open {
    transform: translateX(0);
  }

  .m2-btn,
  .btn,
  .m2-nav-link {
    width: 100%;
  }
}