:root {
  --vk-blue: #042a47;
  --vk-blue-light: #0d5a8a;
  --vk-blue-dark: #021a2e;
  --vk-gold: #c9a84c;
  --vk-gold-light: #d4bc72;
  --vk-gold-dark: #7a6530;
  --vk-white: #ffffff;
  --vk-offwhite: #f5f5f7;
  --vk-gray-100: #e8edf5;
  --vk-gray-200: #c5cdd8;
  --vk-gray-400: #6b7d9a;
  --vk-gray-600: #3a4a5c;
  --vk-gray-900: #0d1420;
  --vk-black: #060a10;
  --vk-success: #22c55e;
  --vk-warning: #f59e0b;
  --vk-error: #ef4444;
  --vk-info: #06b6d4;
  --surface-bg: #060a10;
  --surface-card: #0d1420;
  --surface-elevated: #131d2e;
  --surface-border: #1a2740;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: var(--surface-bg);
  color: var(--vk-gray-100);
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; color: var(--vk-white); }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

a { color: var(--vk-blue-light); text-decoration: none; }
a:hover { color: var(--vk-gold); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--surface-border); margin-bottom: 24px; }
.page-header .logo { height: 32px; }
.page-header .user-info { font-size: 12px; color: var(--vk-gray-400); }

/* Cards */
.card {
  background: var(--surface-card);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}
.card-elevated { background: var(--surface-elevated); }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { text-align: center; padding: 20px 12px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--vk-gold); }
.stat-label { font-size: 11px; color: var(--vk-gray-400); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--vk-blue), var(--vk-blue-light)); color: white; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-gold { background: linear-gradient(135deg, var(--vk-gold-dark), var(--vk-gold)); color: white; }
.btn-gold:hover { filter: brightness(1.15); }
.btn-outline { background: transparent; border: 1px solid var(--vk-blue-light); color: var(--vk-blue-light); }
.btn-outline:hover { background: var(--vk-blue); color: white; }
.btn-danger { background: var(--vk-error); color: white; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; color: var(--vk-gray-400); margin-bottom: 6px; font-weight: 500; }
.input, select, textarea {
  width: 100%; background: var(--surface-elevated); border: 1px solid var(--surface-border);
  color: var(--vk-white); padding: 12px 16px; border-radius: 8px; font-size: 14px;
  font-family: inherit; transition: border-color 0.2s;
}
.input:focus, select:focus, textarea:focus { border-color: var(--vk-blue-light); outline: none; }
select { appearance: none; cursor: pointer; }

/* Tables */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; color: var(--vk-gray-400); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--surface-border); }
td { padding: 10px 12px; border-bottom: 1px solid var(--surface-border); }
tr:hover td { background: var(--surface-elevated); }

/* Badges */
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 9999px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--vk-success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--vk-warning); }
.badge-error { background: rgba(239,68,68,0.15); color: var(--vk-error); }
.badge-info { background: rgba(6,182,212,0.15); color: var(--vk-info); }
.badge-gold { background: rgba(201,168,76,0.15); color: var(--vk-gold); }

/* Toast / notifications */
.toast {
  position: fixed; top: 20px; right: 20px; padding: 14px 20px;
  border-radius: var(--radius-sm); color: white; font-size: 13px;
  z-index: 9999; animation: slideIn 0.3s ease;
}
.toast-success { background: var(--vk-success); }
.toast-error { background: var(--vk-error); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Upload area */
.upload-area {
  border: 2px dashed var(--surface-border); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; cursor: pointer; transition: all 0.3s;
}
.upload-area:hover, .upload-area.dragover { border-color: var(--vk-gold); background: rgba(201,168,76,0.05); }
.upload-area input[type="file"] { display: none; }
.upload-icon { font-size: 48px; margin-bottom: 12px; }

/* Modal */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal { background: var(--surface-card); border: 1px solid var(--surface-border); border-radius: var(--radius-lg); padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-title { margin-bottom: 16px; }

/* Loading spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--surface-border); border-top-color: var(--vk-gold); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Nav */
.nav-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface-card);
  border-top: 1px solid var(--surface-border); display: flex;
  padding: 8px 0; padding-bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 6px; color: var(--vk-gray-400); font-size: 10px;
  text-decoration: none; transition: color 0.2s;
}
.nav-item.active, .nav-item:hover { color: var(--vk-gold); }
.nav-icon { font-size: 20px; }

/* Responsive */
@media (min-width: 768px) {
  .container { padding: 32px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 32px; }
}
@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-gold { color: var(--vk-gold); }
.text-muted { color: var(--vk-gray-400); }
.text-success { color: var(--vk-success); }
.text-error { color: var(--vk-error); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.hidden { display: none; }
