/* =====================================================
   CARDGIFT DASHBOARD CSS
   Точно по скринам
   ===================================================== */

:root {
    --primary: #FFD700;
    --primary-hover: #FFC000;
    --bg-dark: #0D0D0D;
    --bg-card: #1a1a1a;
    --bg-card-hover: #252525;
    --bg-sidebar: #111;
    --text-white: #fff;
    --text-gray: #888;
    --text-muted: #666;
    --border: rgba(255,215,0,0.2);
    --green: #4CAF50;
    --red: #f44336;
    --blue: #2196F3;
    --orange: #FF9800;
    --purple: #9C27B0;
    --pink: #E91E63;
    --yellow: #FFD700;
    --sidebar-width: 280px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100vh;
}

/* LANGUAGE SWITCHER */
.lang-switcher {
    position: fixed;
    top: 15px;
    right: 20px;
    display: flex;
    gap: 5px;
    z-index: 1000;
}
.lang-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-gray);
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}
.lang-btn:hover, .lang-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}
.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.logo-icon { font-size: 32px; }
.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}
.wallet-box {
    background: rgba(255,215,0,0.1);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}
.wallet-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    cursor: pointer;
}
.toggle-track {
    width: 50px;
    height: 26px;
    background: #333;
    border-radius: 13px;
    position: relative;
}
.toggle-thumb {
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}
.wallet-box.connected .toggle-thumb {
    left: 26px;
    background: var(--green);
}
.wallet-status {
    font-size: 12px;
    color: var(--text-gray);
}

/* NAV */
.sidebar-nav {
    flex: 1;
    padding: 15px 10px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-gray);
    transition: background 0.2s, color 0.2s;
    margin-bottom: 4px;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px; /* Минимальный touch target по Apple/Google guidelines */
    user-select: none;
}
.nav-item:hover {
    background: rgba(255,215,0,0.1);
    color: var(--primary);
}
.nav-item.active {
    background: rgba(255,215,0,0.15);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}
.nav-icon { font-size: 18px; width: 24px; text-align: center; }
.nav-text { flex: 1; font-size: 14px; }
.nav-lock { font-size: 12px; opacity: 0.5; }

/* MAIN */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

/* SECTIONS */
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.section-title {
    font-size: 24px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.title-icon { font-size: 28px; }
.section-date { color: var(--text-gray); font-size: 14px; }
.section-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.section-subtitle { color: var(--text-gray); font-size: 14px; }

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.stat-icon { font-size: 32px; margin-bottom: 10px; }
.stat-value { font-size: 28px; font-weight: bold; color: var(--text-white); }
.stat-label { font-size: 13px; color: var(--text-gray); margin-top: 5px; }

/* CONTENT CARD */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 600;
}
.header-icon { font-size: 20px; }
.header-right { margin-left: auto; color: var(--text-gray); font-weight: normal; font-size: 14px; }

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    white-space: nowrap;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #43A047; }
.btn-yellow { background: var(--primary); color: #000; }
.btn-yellow:hover { background: var(--primary-hover); }
.btn-dark { background: #333; color: #fff; }
.btn-dark:hover { background: #444; }
.btn-gray { background: #555; color: #fff; }
.btn-gray:hover { background: #666; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-red { background: var(--red); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-gray); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-outline-yellow { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-block { width: 100%; justify-content: center; margin-top: 10px; }

/* FORMS */
.form-input, .form-select {
    padding: 12px 15px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--text-white);
    font-size: 14px;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
}
.form-input.flex-1 { flex: 1; }
.search-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* QUICK ACTIONS */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.action-btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.action-btn.green { background: var(--green); color: #fff; }
.action-btn.dark { background: #333; color: #fff; }
.action-btn.yellow { background: var(--primary); color: #000; }

/* PLATFORMS GRID */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}
.platform-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}
.platform-icon { font-size: 28px; margin-bottom: 8px; }
.platform-name { font-size: 13px; color: var(--text-white); margin-bottom: 5px; }
.platform-count { font-size: 16px; color: var(--primary); font-weight: bold; }

/* TABLE */
.table-wrapper { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: rgba(255,215,0,0.1);
    color: var(--primary);
    padding: 12px 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}
.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.empty-table {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}

/* LEVELS ROW (9 circles) */
.levels-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
}
.level-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-gray);
}
.level-circle.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #000;
}

/* RESTRICTED BLOCK */
.restricted-block {
    text-align: center;
    padding: 50px 20px;
}
.restricted-icon { font-size: 64px; margin-bottom: 15px; }
.restricted-title { font-size: 20px; color: var(--primary); margin-bottom: 10px; }
.restricted-text { color: var(--text-gray); margin-bottom: 20px; }

/* REFERRAL LINK */
.referral-link-row {
    display: flex;
    gap: 10px;
}

/* ARCHIVE */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.empty-archive {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon { font-size: 64px; margin-bottom: 15px; }
.empty-title { font-size: 20px; margin-bottom: 10px; }
.empty-text { color: var(--text-gray); margin-bottom: 20px; }

/* ACTIVITY */
.activity-empty {
    color: var(--text-gray);
    padding: 20px 0;
}

/* USAGE LABEL */
.usage-label {
    color: var(--text-gray);
    font-size: 14px;
}

/* MLM LEVELS */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}
.level-input {
    display: flex;
    align-items: center;
    gap: 10px;
}
.level-input span { color: var(--text-gray); }
.level-input input {
    width: 60px;
    padding: 8px;
    background: #222;
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text-white);
    text-align: center;
}
.mlm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* WALLET SECTION */
.wallet-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.activation-levels {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.activation-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
}
.activation-card.user { background: linear-gradient(135deg, #333, #222); }
.activation-card.mini-admin { background: linear-gradient(135deg, #5a4a00, #3a3000); border-color: var(--primary); }
.activation-card.admin { background: linear-gradient(135deg, #4a3500, #2a2000); border-color: var(--orange); }
.activation-card.super-admin { background: linear-gradient(135deg, #3a2a00, #1a1500); border-color: var(--red); }
.activation-card:hover { transform: translateY(-3px); }
.level-icon { font-size: 24px; margin-bottom: 10px; }
.level-name { font-size: 14px; margin-bottom: 5px; }
.activation-card.user .level-name { color: var(--text-white); }
.activation-card.mini-admin .level-name { color: var(--primary); }
.activation-card.admin .level-name { color: var(--orange); }
.activation-card.super-admin .level-name { color: var(--red); }
.level-price { font-size: 12px; color: var(--text-gray); }

.benefits-list { margin-top: 10px; }
.benefit-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.benefit-item:last-child { border-bottom: none; }
.globalway-btn { text-align: center; margin-top: 20px; }

.network-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.info-row { }
.info-label { display: block; font-size: 12px; color: var(--text-gray); margin-bottom: 5px; }
.info-value { font-size: 14px; }
.info-value.yellow { color: var(--primary); }
.info-value.blue { color: var(--blue); }
.info-value.link { color: var(--blue); text-decoration: none; }

/* SETTINGS */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.setting-item label {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
}
.settings-row {
    display: flex;
    gap: 20px;
}
.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-white);
}
.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}
.security-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.security-section h4 {
    color: var(--primary);
    margin-bottom: 15px;
}

/* IN DEVELOPMENT / COMING SOON */
.in-development, .coming-soon, .empty-campaigns, .empty-coauthors {
    text-align: center;
    padding: 40px;
    color: var(--text-gray);
}
.coming-icon { font-size: 48px; margin-bottom: 15px; }
.coming-title { font-size: 18px; color: var(--primary); margin-bottom: 10px; }
.coming-text { margin-bottom: 20px; }

/* FOUNDER CARD */
.founder-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255,215,0,0.1);
    border-radius: 10px;
}
.founder-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.founder-name { color: var(--primary); font-weight: bold; }
.founder-role { font-size: 13px; color: var(--text-gray); }

/* BLOG INFO */
.blog-info-card h3 { color: var(--primary); margin-bottom: 5px; }
.blog-info-card p { color: var(--text-gray); margin-bottom: 10px; }
.blog-info-card a { color: var(--green); }

/* TOAST */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    animation: slideIn 0.3s;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.toast.success { border-left: 4px solid var(--green); }
.toast.error { border-left: 4px solid var(--red); }

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    overflow: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { color: var(--primary); margin: 0; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 20px;
    cursor: pointer;
}
.modal-close:hover { color: var(--primary); }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-gray);
    font-size: 13px;
}

/* ARCHIVE CARDS */
.card-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: 0.2s;
}
.card-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}
.card-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
}
.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-placeholder { font-size: 48px; opacity: 0.5; }
.card-info { padding: 15px; }
.card-title { font-weight: 600; margin-bottom: 5px; }
.card-date { font-size: 12px; color: var(--text-gray); }
.card-actions {
    padding: 10px 15px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    opacity: 0.7;
    transition: 0.2s;
}
.btn-icon:hover { opacity: 1; transform: scale(1.1); }

/* PLATFORM BADGES */
.platform-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: #333;
}
.platform-badge.telegram { background: #0088cc; color: #fff; }
.platform-badge.whatsapp { background: #25D366; color: #fff; }
.platform-badge.email { background: #EA4335; color: #fff; }
.platform-badge.phone { background: var(--pink); color: #fff; }
.platform-badge.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.platform-badge.facebook { background: #1877F2; color: #fff; }
.platform-badge.tiktok { background: #000; color: #fff; }
.platform-badge.twitter { background: #1DA1F2; color: #fff; }
.platform-badge.viber { background: #7360f2; color: #fff; }

/* LOCKED NAV */
.nav-item.locked { opacity: 0.5; }
.nav-item.locked:hover { background: rgba(255,0,0,0.1); }

/* MOBILE */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--primary);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 90;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); transition: 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; padding: 80px 20px 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .activation-levels { grid-template-columns: repeat(2, 1fr); }
    .settings-grid { grid-template-columns: repeat(2, 1fr); }
    .network-info { grid-template-columns: repeat(2, 1fr); }
    .levels-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; }
    .activation-levels { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .security-grid { grid-template-columns: 1fr; }
    .network-info { grid-template-columns: 1fr; }
    .platforms-grid { grid-template-columns: repeat(3, 1fr); }
    .levels-row { flex-wrap: wrap; }
    .level-circle { width: 36px; height: 36px; font-size: 14px; }
    .quick-actions { flex-direction: column; }
    .action-btn { width: 100%; justify-content: center; }
}

/* =====================================================
   CARDGIFT - ARCHIVE CHECKBOX STYLES
   Дополнительные стили для архива с чекбоксами
   Добавь в конец dashboard.css
   ===================================================== */

/* Toolbar архива */
.archive-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.toolbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.selected-count {
    color: #FFD700;
    font-weight: bold;
    padding: 5px 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 5px;
}

/* Кнопки */
.btn-red {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-red:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
}

.btn-outline-red {
    background: transparent;
    border: 1px solid #f44336;
    color: #f44336;
}

.btn-outline-red:hover {
    background: rgba(244, 67, 54, 0.1);
}

.btn-blue {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.btn-blue:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

/* Карточки в архиве с чекбоксами */
.card-item {
    position: relative;
    background: #2a2a4a;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.card-item.selected {
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

/* Чекбокс на карточке */
.card-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-checkbox:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.card-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FFD700;
}

/* Превью карточки */
.card-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    font-size: 48px;
    opacity: 0.5;
}

/* Информация о карточке */
.card-info {
    padding: 12px;
}

.card-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-date {
    font-size: 12px;
    color: #888;
}

/* Действия с карточкой */
.card-actions {
    display: flex;
    gap: 5px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    justify-content: center;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Сетка архива */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

/* Пустой архив */
.empty-archive {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
}

.empty-text {
    color: #888;
    margin-bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .archive-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: center;
    }
    
    .archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .card-preview {
        height: 120px;
    }
}

/* Модальное окно */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal {
    background: #1a1a2e;
    border-radius: 15px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    border: 1px solid #333;
}

.modal h3 {
    color: #FFD700;
    margin-bottom: 20px;
    text-align: center;
}

.modal .form-group {
    margin-bottom: 15px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}
/* =====================================================
   ARCHIVE TABS - Вкладки архива
   ===================================================== */

.archive-tabs {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    background: #1a1a2e;
    border-radius: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.archive-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.archive-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.archive-tab.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    border-color: #FFD700;
    font-weight: bold;
}

.archive-tab-content {
    display: none;
}

.archive-tab-content.active {
    display: block;
}

/* Действия для шаблонов */
.template-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border: 1px dashed #FFD700;
}

.template-hint {
    color: #888;
    font-size: 13px;
}

/* Информация о модерации */
.moderation-info {
    padding: 15px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    margin-bottom: 20px;
    color: #FF9800;
}

/* Кнопки модерации на карточках */
.moderation-actions {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.btn-approve {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    flex: 1;
}

.btn-reject {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    flex: 1;
}

/* Бейдж статуса шаблона */
.template-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    z-index: 5;
}

.template-badge.corporate {
    background: #FFD700;
    color: #000;
}

.template-badge.leader {
    background: #2196F3;
    color: #fff;
}

.template-badge.pending {
    background: #FF9800;
    color: #fff;
}

/* Кнопка "Использовать" на шаблонах */
.btn-use-template {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    width: 100%;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-use-template:hover {
    background: linear-gradient(135deg, #388E3C, #2E7D32);
}

/* Адаптивность вкладок */
@media (max-width: 768px) {
    .archive-tabs {
        padding: 10px;
    }
    
    .archive-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .template-actions {
        flex-direction: column;
        text-align: center;
    }
}

/* =====================================================
   MODAL FIX - Исправление модального окна
   ===================================================== */

.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: 20px !important;
}

.modal {
    background: #1a1a2e !important;
    border-radius: 15px !important;
    padding: 30px !important;
    max-width: 450px !important;
    width: 100% !important;
    border: 1px solid #444 !important;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5) !important;
    position: relative !important;
    z-index: 100000 !important;
}

.modal h3 {
    color: #FFD700 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    font-size: 20px !important;
}

.modal .form-group {
    margin-bottom: 15px !important;
}

.modal .form-group label {
    display: block !important;
    margin-bottom: 8px !important;
    color: #ccc !important;
    font-size: 14px !important;
}

.modal .form-input,
.modal .form-select {
    width: 100% !important;
    padding: 12px !important;
    background: #2a2a4a !important;
    border: 1px solid #444 !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 14px !important;
}

.modal-buttons {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
    margin-top: 25px !important;
}

/* Businessman карточка */
.activation-card.businessman {
    background: linear-gradient(135deg, #FFD700, #FFA000);
    border: 2px solid #FFD700;
    color: #000;
}

.activation-card.businessman .level-icon {
    font-size: 28px;
}

.activation-card.businessman .level-name {
    color: #000;
    font-weight: bold;
}

.activation-card.businessman .level-price {
    color: #333;
}
