@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #0B0F19; 
  --bg-sidebar: #131A2B;
  --bg-card: rgba(19, 26, 43, 0.6);
  --bg-card-hover: rgba(19, 26, 43, 0.9);
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --accent: #6366F1;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --danger: #F43F5E;
  --warning: #F59E0B;
  --success: #10B981;
  --border-color: rgba(255, 255, 255, 0.08);
}

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

html,
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: fixed;
  height: 100vh;
  z-index: 10;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-item:hover, .nav-item.active {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
  border-left: 3px solid var(--accent);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

.main-content::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  will-change: auto;
}

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

.page-header h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.page-header p {
  color: var(--text-muted);
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  background: #131A2B;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  will-change: auto;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(99, 102, 241, 0.3);
  background: #1a2438;
}

.stat-title {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Alerts */
.alerts-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.alert-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(244, 63, 94, 0.1);
  border-left: 4px solid var(--danger);
  border-radius: 0.75rem;
  animation: slideIn 0.4s ease-out;
}
.alert-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}
.alert-actions .btn {
  white-space: nowrap;
}

.alert-card.warning {
  background: rgba(245, 158, 11, 0.1);
  border-left-color: var(--warning);
}

.alert-content h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.alert-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.2;
}
.btn:hover {
  background-color: #4f46e5;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
}
.btn-danger {
  background-color: var(--danger);
  color: white;
  border: none;
}
.btn-danger:hover {
  background-color: #e11d48;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.875rem;
}

/* Forms */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0;
}

.form-group {
    flex: 1;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}
.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Custom Select Styling */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

select.form-control option {
    background-color: var(--bg-sidebar);
    color: var(--text-main);
    padding: 0.5rem;
}

/* Native Input Icons (Date picker, etc.) */
::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 1;
    cursor: pointer;
    transition: opacity 0.2s;
}
::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Datalist Dropdown Icon to match Select */
input[list]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    opacity: 1;
    filter: none;
    color: transparent;
}
::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Smart Paste Highlight */
.smart-paste-area {
  border-left: 3px solid var(--success) !important;
}

/* Admin Folders */
.admin-card {
  position: relative;
  overflow: hidden;
}
.admin-card .progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
}
.admin-card .progress-bar {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
}
.admin-card .progress-bar.full {
  background: var(--danger);
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  background: rgba(0,0,0,0.2);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
.copy-row span {
  font-family: monospace;
  color: var(--text-muted);
}
.copy-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1.2rem;
  transition: 0.2s;
}
.copy-btn:hover {
  color: #fff;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Toast Notifications */
.flashes {
  list-style: none;
  margin-bottom: 1rem;
}
.flashes li {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: slideIn 0.4s ease-out;
}
.flashes li.error {
  background: rgba(244, 63, 94, 0.1);
  border-left-color: var(--danger);
}
.flashes li.fade-out {
  opacity: 0;
  transform: translateX(20px);
}
.close-flash {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  font-size: 1.25rem;
}
.close-flash:hover {
  opacity: 1;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.table th, .table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.table th {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.table tr:last-child td {
    border-bottom: none;
}
.table tbody tr {
    transition: background-color 0.2s;
}
.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04);
}
/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    transform: translateY(-20px);
    transition: 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.modal-close:hover {
    color: #fff;
}
.badge-personal {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    margin-top: 0.25rem;
}

/* ==========================================
   YA.MARKET Module Styles
   ========================================== */

/* REAL / TEST Toggle */
.ym-toggle-btn {
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ym-toggle-btn:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}
.ym-toggle-active {
    color: var(--success) !important;
    background: rgba(16, 185, 129, 0.1) !important;
}
.ym-toggle-active-test {
    color: var(--warning) !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

/* Date Filter Bar */
.ym-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    backdrop-filter: blur(12px);
    margin-bottom: 1.5rem;
}

.ym-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ym-filter-group label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ym-date-input {
    max-width: 170px;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
}

/* Order status badges */
.ym-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ym-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.ym-status-processing {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}
.ym-status-processing .ym-status-dot {
    background: #818cf8;
    box-shadow: 0 0 6px rgba(129, 140, 248, 0.6);
    animation: pulse-dot 2s infinite;
}
.ym-status-delivered {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.ym-status-delivered .ym-status-dot {
    background: var(--success);
}
.ym-status-cancelled {
    background: rgba(244, 63, 94, 0.12);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.25);
}
.ym-status-cancelled .ym-status-dot {
    background: var(--danger);
}
.ym-status-other {
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.ym-status-other .ym-status-dot {
    background: var(--text-muted);
}

/* Order icon */
.ym-order-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.6rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.3s;
}
tr:hover .ym-order-icon {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Badge for digital and test */
.ym-badge-digital {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.ym-badge-test {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Pagination */
.ym-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.ym-page-indicator {
    color: var(--text-muted);
    font-size: 0.85rem;
    background: rgba(0,0,0,0.2);
    padding: 0.3rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
}
.ym-page-indicator strong {
    color: var(--text-main);
}

/* Spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pulsing dot for PROCESSING status */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
}

/* ==========================================
   Neirosklad Improvements Styles
   ========================================== */

tr.row-expired td {
    background-color: rgba(244, 63, 94, 0.05);
}
tr.row-expiring-soon td {
    background-color: rgba(245, 158, 11, 0.05);
}
tr.row-important td:first-child,
.card.row-important {
    border-left: 3px solid var(--warning) !important;
}

.badge-expired {
    background: rgba(244, 63, 94, 0.2);
    color: var(--danger);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
}

.badge-warning-days {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
}

.subscription-timeline {
    margin-top: 1rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.timeline-item {
    position: relative;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.35rem;
    top: 0.4rem;
    width: 0.6rem;
    height: 0.6rem;
    background: var(--accent);
    border-radius: 50%;
}
.timeline-content {
    background: rgba(0,0,0,0.2);
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-contact {
    background-color: #0088cc;
    color: white;
}
.btn-contact:hover {
    background-color: #0077b5;
    box-shadow: 0 4px 20px rgba(0, 136, 204, 0.4);
}
.btn-contact[disabled] {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}
.overdue-summary {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.4);
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.overdue-summary .btn {
    width: auto !important;
    padding: 0.625rem 1.5rem !important;
    font-size: 0.95rem !important;
}

/* Important Toggle Button */
.important-toggle input {
    display: none;
}
.important-toggle .toggle-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.important-toggle .toggle-btn-content:hover {
    background: rgba(255, 255, 255, 0.1);
}
.important-toggle input:checked + .toggle-btn-content {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--warning);
    color: var(--warning);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
}

/* Checkbox Chips */
.checkbox-chip {
    display: inline-flex;
    cursor: pointer;
}
.checkbox-chip input {
    display: none;
}
.checkbox-chip span {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    user-select: none;
}
.checkbox-chip:hover span {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.checkbox-chip input:checked + span {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* ==========================================
   Responsive & Mobile Adaptations
   ========================================== */

.mobile-only {
    display: none !important;
}
.desktop-only {
    display: block !important;
}
.mobile-header {
    display: none;
}
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    body {
        flex-direction: column !important;
    }

    .mobile-only {
        display: block !important;
    }
    .mobile-only.flex-layout {
        display: flex !important;
    }
    .desktop-only {
        display: none !important;
    }
    
    /* Pinned sidebar is hidden on mobile */
    .sidebar {
        display: none !important;
    }
    
    /* Content occupies full width with bottom offset for mobile navigation */
    .main-content {
        margin-left: 0 !important;
        padding: 1rem 1rem 6.5rem 1rem !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Filter bars stack vertically on mobile */
    .filter-bar form {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    .filter-bar form > div {
        width: 100% !important;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .filter-bar form > div > input,
    .filter-bar form > div > select {
        width: 100% !important;
    }
    .filter-bar form > div > button,
    .filter-bar form > div > a {
        flex: 1;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Sticky Top Header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        background: rgba(19, 26, 43, 0.9);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 40;
    }
    .mobile-header .brand {
        font-size: 1.25rem;
        font-weight: 700;
        background: linear-gradient(135deg, #fff, #94a3b8);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    .mobile-header-action {
        display: none !important;
    }
    
    /* Fixed Bottom Nav (Tab Bar) */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: rgba(19, 26, 43, 0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        z-index: 40;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 500;
        gap: 0.25rem;
        flex: 1;
        height: 100%;
        transition: color 0.2s;
    }
    .mobile-nav-item i {
        font-size: 1.5rem;
    }
    .mobile-nav-item.active {
        color: var(--accent);
    }
    
    /* Bottom Sheet Modals */
    .modal-overlay {
        align-items: flex-end;
    }
    .modal-content {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 1.25rem 1.25rem 0 0;
        transform: translateY(100%);
        max-height: 85vh;
        margin-bottom: 0;
        border-bottom: none;
        transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        padding: 1.25rem !important;
    }
    .table th, .table td {
        padding: 0.75rem 0.5rem !important;
    }
    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
    
    /* Grid system collapses to single column */
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .alerts-section {
        grid-column: span 1 !important;
    }
    
    /* Forms & Rows collapse vertically */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    /* Responsive Buttons */
    .btn:not(.btn-sm):not(.tfa-icon-btn) {
        width: 100%;
        justify-content: center;
    }
    .page-header .btn {
        width: 100%;
    }
    
    /* Mobile-first alignment for lists and timelines */
    .timeline-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .timeline-content form {
        width: 100%;
    }
    .timeline-content form button {
        width: 100%;
        justify-content: center;
    }
    
    /* Unified right-aligned card alert actions on mobile */
    .alert-card {
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .alert-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 130px !important;
        flex-shrink: 0;
    }
    .alert-actions .btn {
        width: 100% !important;
        height: 34px !important;
        padding: 0 0.75rem !important;
        font-size: 0.8rem !important;
        justify-content: center !important;
    }
}

/* Custom Global & Responsive Additions */
.w-100 {
    width: 100% !important;
}

@media (max-width: 768px) {
    .mobile-hide-text {
        display: none !important;
    }
    
    .desktop-only-btn {
        display: none !important;
    }
    
    .filter-bar .filters-row {
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    .pagination {
        font-size: 0.85rem;
    }
    
    .pagination span {
        padding: 0 0.5rem !important;
    }
}

/* Primary Action Button styles */
.btn-primary-action {
    background-color: var(--accent) !important;
    color: white !important;
    border: none !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
}
.btn-primary-action:hover {
    background-color: #4f46e5 !important;
    box-shadow: 0 4px 20px var(--accent-glow) !important;
}

@media (max-width: 768px) {
    .btn-primary-action {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem 1.25rem !important;
    }
    .page-header-actions {
        width: 100% !important;
    }
    .copy-line {
        max-width: 140px;
    }
    .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.copy-line {
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    margin-bottom: 0.2rem;
    display: inline-block;
    vertical-align: middle;
}
.copy-line:hover { color: var(--text-main); }

/* ─── 2FA Cell Icons ─── */
.tfa-cell { display: flex; gap: 0.4rem; align-items: center; }
.tfa-icon-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem 0.45rem;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.18s, color 0.18s, transform 0.12s;
    display: flex; align-items: center;
}
.tfa-icon-btn:hover { background: rgba(255,255,255,0.15); color: var(--text-main); transform: scale(1.08); }
.tfa-get-btn:hover { color: #7EB8FF; border-color: rgba(126,184,255,0.4); }

/* ─── TOTP Overlay ─── */
.totp-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center; justify-content: center;
}
.totp-overlay.active { display: flex; }
.totp-modal {
    background: linear-gradient(145deg, #1a1f35, #111827);
    border: 1px solid rgba(126,184,255,0.25);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    padding: 1.5rem 2rem 1.8rem;
    width: 340px; max-width: 94vw;
    animation: totpSlideIn 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes totpSlideIn {
    from { opacity: 0; transform: scale(0.88) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.totp-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.4rem; font-size: 0.95rem; font-weight: 600;
    color: #7EB8FF; letter-spacing: 0.02em;
}
.totp-code-wrap { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; gap: 1rem; }
.totp-code {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(126,184,255,0.08);
    border: 1px solid rgba(126,184,255,0.2);
    border-radius: 10px; padding: 0.7rem 1.1rem;
    cursor: pointer; transition: background 0.15s; flex: 1;
}
.totp-code:hover { background: rgba(126,184,255,0.16); }
.totp-code span { font-size: 2rem; font-weight: 700; letter-spacing: 0.18em; color: #fff; font-family: 'Courier New', monospace; }
.totp-copy-hint { color: var(--text-muted); font-size: 0.9rem; }
.totp-timer-wrap { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.totp-timer-svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.totp-timer-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 3.5; }
.totp-timer-arc {
    fill: none; stroke: #7EB8FF; stroke-width: 3.5;
    stroke-linecap: round; stroke-dasharray: 106.8;
    stroke-dashoffset: 0; transition: stroke-dashoffset 0.9s linear, stroke 0.5s;
}
.totp-timer-arc.warn { stroke: #FFB347; }
.totp-timer-arc.danger { stroke: #FF6B6B; }
.totp-timer-num {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700; color: var(--text-main);
}
.totp-secret-row {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px; padding: 0.55rem 0.8rem;
    cursor: pointer; transition: background 0.15s;
}
.totp-secret-row:hover { background: rgba(0,0,0,0.4); }
.totp-secret-text {
    flex: 1; font-size: 0.75rem; color: var(--text-muted);
    font-family: 'Courier New', monospace;
    word-break: break-all; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.totp-code.copied { background: rgba(0,200,100,0.18); border-color: rgba(0,200,100,0.4); }
.totp-secret-row.copied { background: rgba(0,200,100,0.12); border-color: rgba(0,200,100,0.3); }

/* Yandex.Market Custom Responsive Adjustments */
@media (max-width: 768px) {
    .ym-toggle-wrapper {
        display: none !important;
    }
    .ym-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    .ym-filter-group {
        width: 100% !important;
    }
    .ym-date-input {
        max-width: 100% !important;
        width: 100% !important;
    }
    .ym-filter-bar button[type="submit"] {
        width: 100% !important;
        align-self: stretch !important;
    }
    .ym-filter-bar > span {
        display: none !important;
    }
}

