/* Admin Panel Styles - Improved and Aligned */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

#adminApp {
    min-height: 100vh;
    background: var(--color-bg-body-mid, #e8ecf2);
    font-family: var(--font-sans, "Inter", system-ui, sans-serif);
    margin: 0;
    padding: 0;
}

/* Reset styles for admin login to avoid conflicts */
#adminLogin * {
    box-sizing: border-box;
}

#adminLogin {
    margin: 0;
    padding: 0;
}

/* Login Page */

.admin-login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(
        145deg,
        #0f172a 0%,
        rgba(var(--color-accent-rgb), 0.88) 55%,
        #0c1929 100%
    );
    padding: 20px;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.admin-login-box {
    background: white;
    padding: 48px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.admin-login-box h1 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

.admin-login-box h3 {
    margin: 0 0 32px 0;
    color: #666;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    line-height: 1.4;
}

.admin-login-box form {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
}

.admin-login-box label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.admin-login-box input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
    color: #333;
    box-sizing: border-box;
    margin: 0 0 20px 0;
}

.admin-login-box input[type="password"]:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

.admin-login-box input[type="password"]::placeholder {
    color: #999;
}

.admin-login-box .btn.primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    margin: 0;
    border: none;
    background: var(--color-accent);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-login-box .btn.primary:hover {
    background: var(--color-accent-strong);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--color-accent-rgb), 0.3);
}

.admin-login-box .btn.primary:active {
    transform: translateY(0);
}

.admin-login-box .btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.admin-login-box .form-status {
    text-align: center;
    margin-top: 16px;
    min-height: 24px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    box-sizing: border-box;
}

.admin-login-box .form-status:not(:empty) {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.admin-login-box .form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.admin-login-box .form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Header */
.admin-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.admin-header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 700;
}

.admin-header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #4c5775;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f39c12;
    flex-shrink: 0;
}

.status-card.online .status-dot {
    background: #27ae60;
}

.status-card.offline .status-dot {
    background: #e74c3c;
}

.status-card.online {
    border-color: rgba(39, 174, 96, 0.3);
    background: #f0fdf4;
}

.status-card.offline {
    border-color: rgba(231, 76, 60, 0.3);
    background: #fef2f2;
}

.logout-btn {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Main Layout */
.admin-main {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    gap: 24px;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar li {
    margin: 0;
    width: 100%;
    display: flex;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    justify-content: flex-start;
    border: 2px solid transparent;
}

.admin-nav-link:hover {
    background: #f5f7fa;
    color: var(--color-accent);
    border-color: #e0e0e0;
}

.admin-nav-link.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    box-shadow: 0 2px 4px rgba(var(--color-accent-rgb), 0.2);
    font-weight: 600;
}

.admin-nav-link:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

.admin-nav-link:active {
    transform: scale(0.98);
}

/* Content Area */
.admin-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e0e0e0;
    min-height: 600px;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.admin-section h2 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.75rem;
    font-weight: 700;
}

.new-post-btn {
    padding: 12px 24px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
}

.new-post-btn:hover {
    background: #229954;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 28px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.stat-card h3 {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 2.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

/* Forms */
#adminApp form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
}

#adminApp label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: block;
}

#adminApp input[type="text"],
#adminApp input[type="email"],
#adminApp input[type="tel"],
#adminApp input[type="url"],
#adminApp input[type="number"],
#adminApp input[type="password"],
#adminApp textarea,
#adminApp select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
    box-sizing: border-box;
}

#adminApp input:focus,
#adminApp textarea:focus,
#adminApp select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

#adminApp textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

#adminApp small {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 400;
}

/* Buttons - Override base styles for admin */
#adminApp .btn,
#adminApp button:not([type="submit"]):not([type="button"]) {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
}

#adminApp .btn.primary,
#adminApp button[type="submit"] {
    background: var(--color-accent);
    color: white;
    border: none;
}

#adminApp .btn.primary:hover,
#adminApp button[type="submit"]:hover:not(:disabled) {
    background: var(--color-accent-strong);
}

#adminApp .btn.outline {
    background: white;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

#adminApp .btn.outline:hover {
    background: #f5f7fa;
}

#adminApp .btn.danger {
    background: #e74c3c;
    color: white;
    border: none;
}

#adminApp .btn.danger:hover {
    background: #c0392b;
}

#adminApp .btn.small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

#adminApp .btn:disabled,
#adminApp button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#adminApp button[type="button"] {
    background: #95a5a6;
    color: white;
    border: none;
}

#adminApp button[type="button"]:hover:not(:disabled) {
    background: #7f8c8d;
}

/* Admin Tools */
.admin-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.admin-tools input[type="text"] {
    flex: 1;
    min-width: 250px;
    margin: 0;
}

.admin-bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Post Items */
.admin-post-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.admin-post-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bulk-checkbox {
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.bulk-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

.admin-post-content {
    flex: 1;
    min-width: 0;
}

.admin-post-content h4 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
}

.admin-post-content p {
    margin: 8px 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.admin-post-meta {
    color: #4c53a0;
    font-size: 0.85rem;
    margin: 8px 0;
}

.admin-post-price {
    color: #27ae60;
    font-weight: 600;
    margin: 8px 0;
}

.admin-post-content small {
    color: #999;
    font-size: 0.85rem;
    display: block;
    margin-top: 8px;
}

.admin-post-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.edit-btn,
.delete-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.edit-btn {
    background: #3498db;
    color: white;
}

.edit-btn:hover {
    background: #2980b9;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Contact Items */
.admin-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #ddd;
    transition: box-shadow 0.2s;
}

.admin-contact-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-contact-item.status-new {
    border-left-color: #3498db;
    background: #f0f8ff;
}

.admin-contact-item.status-read {
    border-left-color: #f39c12;
    background: #fffbf0;
}

.admin-contact-item.status-processed {
    border-left-color: #27ae60;
    background: #f0fff4;
}

.admin-contact-content {
    flex: 1;
    min-width: 0;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-header h4 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-status {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.contact-status.status-new {
    background: #3498db;
    color: white;
}

.contact-status.status-read {
    background: #f39c12;
    color: white;
}

.contact-status.status-processed {
    background: #27ae60;
    color: white;
}

.contact-phone {
    margin: 8px 0;
    color: #333;
    font-weight: 500;
}

.contact-message {
    margin: 12px 0;
    color: #666;
    line-height: 1.6;
    white-space: pre-wrap;
}

.admin-contact-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.mark-read-btn,
.mark-processed-btn,
.delete-contact-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
}

.mark-read-btn {
    background: #3498db;
    color: white;
}

.mark-read-btn:hover {
    background: #2980b9;
}

.mark-processed-btn {
    background: #f39c12;
    color: white;
}

.mark-processed-btn:hover {
    background: #e67e22;
}

.delete-contact-btn {
    background: #e74c3c;
    color: white;
}

.delete-contact-btn:hover {
    background: #c0392b;
}

/* Order Items */
.admin-order-item {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #ddd;
    transition: box-shadow 0.2s;
}

.admin-order-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-order-item.status-pending {
    border-left-color: #f39c12;
}

.admin-order-item.status-active {
    border-left-color: #27ae60;
}

.admin-order-item.status-cancelled {
    border-left-color: #e74c3c;
}

.admin-order-content {
    flex: 1;
}

.admin-order-content h4 {
    margin: 0 0 12px 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
}

.admin-order-content p {
    margin: 8px 0;
    color: #666;
    font-size: 0.95rem;
}

.admin-order-content .status-pending,
.admin-order-content .status-active,
.admin-order-content .status-cancelled {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.admin-order-content .status-pending {
    background: #fff3cd;
    color: #856404;
}

.admin-order-content .status-active {
    background: #d4edda;
    color: #155724;
}

.admin-order-content .status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.payment-paid {
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.payment-unpaid {
    background: #fff3cd;
    color: #856404;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.admin-order-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.order-quick-edit {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.order-quick-edit select {
    flex: 1;
    min-width: 150px;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.order-action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* User Items */
.admin-user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.admin-user-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-user-content {
    flex: 1;
}

.admin-user-content h4 {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-user-content h4 span {
    background: #4CAF50;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-user-content p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9rem;
}

.admin-user-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.toggle-admin-btn {
    white-space: nowrap;
}

/* VPS Items */
.admin-vps-item {
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.admin-vps-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-vps-content h4 {
    margin: 0 0 12px 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
}

.admin-vps-content p {
    margin: 8px 0;
    color: #666;
    font-size: 0.95rem;
}

.admin-subpanel {
    margin-bottom: 28px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.admin-help-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
    margin-bottom: 16px;
}

.admin-vps-clients-title {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.pve-template-form label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.9rem;
}

.pve-template-form input[type="text"],
.pve-template-form input[type="number"],
.pve-template-form input[type="file"],
.pve-template-form select {
    width: 100%;
    max-width: 480px;
    margin-top: 4px;
}

.pve-template-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 520px;
}

.pve-template-meta {
    margin-top: 12px;
    font-size: 0.88rem;
    color: #444;
}

.pve-template-meta-line code {
    font-size: 0.85rem;
}

.pve-template-list-title {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 1rem;
}

.pve-template-db-list .muted {
    color: #777;
    font-size: 0.9rem;
}

.pve-template-db-item {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Текст займає доступну ширину й переноситься всередині колонки — кнопки лишаються в одному ряду справа */
.pve-template-db-item > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.45;
}

.pve-template-db-actions {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

@media (max-width: 640px) {
    .pve-template-db-item {
        flex-wrap: wrap;
    }

    .pve-template-db-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}

.pve-template-progress-wrap {
    margin-top: 14px;
    margin-bottom: 8px;
    max-width: 520px;
}

.pve-template-progress-wrap[hidden] {
    display: none !important;
}

.pve-template-progress-step {
    margin: 0 0 8px 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1a1a1a;
}

.pve-template-progress-hint {
    margin: 8px 0 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.pve-template-progress-track {
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.pve-template-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    transition: width 0.2s ease;
}

.pve-template-progress-fill.is-indeterminate {
    width: 100% !important;
    background: linear-gradient(90deg, #2563eb 0%, #38bdf8 45%, #2563eb 100%);
    background-size: 200% 100%;
    animation: pve-template-progress-indet 1.2s linear infinite;
}

@keyframes pve-template-progress-indet {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pve-template-progress-fill.is-indeterminate {
        animation: none;
        opacity: 0.75;
    }
}

.vps-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.vps-status.running {
    background: #d4edda;
    color: #155724;
}

.vps-status.stopped {
    background: #f8d7da;
    color: #721c24;
}

.vps-status.unknown {
    background: #e2e3e5;
    color: #383d41;
}

/* Post Form Container */
#postFormContainer {
    background: #f8f9fa;
    padding: 32px;
    border-radius: 12px;
    margin: 24px 0;
    border: 1px solid #e0e0e0;
}

#postFormContainer h3 {
    margin: 0 0 28px 0;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 700;
}

#postFormContainer form {
    max-width: 100%;
}

#postFormContainer h4 {
    margin: 32px 0 16px 0;
    padding-top: 24px;
    border-top: 2px solid #e0e0e0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
}

#postFormContainer button[type="submit"] {
    margin-top: 8px;
    width: auto;
    align-self: flex-start;
}

#postFormContainer #cancelPostBtn {
    background: #95a5a6;
    color: white;
    margin-left: 12px;
    border: none;
}

#postFormContainer #cancelPostBtn:hover {
    background: #7f8c8d;
}

/* Form Status */
.form-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 0.9rem;
    min-height: 20px;
    font-weight: 500;
}

.form-status:not(:empty) {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 32px;
    border-radius: 12px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
}

.modal-close:hover {
    color: #333;
    background: #e0e0e0;
}

.modal-content h3 {
    margin: 0 0 28px 0;
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 700;
    padding-right: 40px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-content label {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: block;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
    box-sizing: border-box;
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

.modal-content textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.modal-content .form-status {
    margin-top: 12px;
}

/* CSS Editor */
.css-editor-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.css-editor-toolbar select {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    height: 44px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.css-editor-toolbar select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

.css-editor-toolbar button {
    height: 44px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    box-sizing: border-box;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

.css-editor-toolbar .btn.outline {
    background: white;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.css-editor-toolbar .btn.outline:hover {
    background: #f5f7fa;
    border-color: var(--color-accent-strong);
}

.css-editor-toolbar .btn.primary {
    background: var(--color-accent);
    color: white;
    border: 2px solid var(--color-accent);
}

.css-editor-toolbar .btn.primary:hover {
    background: var(--color-accent-strong);
    border-color: var(--color-accent-strong);
}

.css-editor-toolbar .btn.small {
    padding: 0 18px;
    font-size: 0.9rem;
}

.css-editor-toolbar .btn.danger {
    background: #e74c3c;
    color: white;
    border: 2px solid #e74c3c;
}

.css-editor-toolbar .btn.danger:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.css-editor-toolbar .btn.danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#cssEditorWrapper {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    background: white;
    transition: border-color 0.2s;
}

#cssEditorWrapper:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.1);
}

#cssEditor {
    width: 100%;
    min-height: 500px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 15px;
    border: none;
    resize: vertical;
    background: #1e1e1e;
    color: #d4d4d4;
    line-height: 1.6;
}

#cssEditor:focus {
    outline: none;
}

.CodeMirror {
    height: 500px;
    font-size: 14px;
    border-radius: 0;
}

.CodeMirror-focused {
    outline: none;
}

#cssEditorInfo {
    margin-top: 0;
    padding: 24px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    align-items: start;
}

#cssEditorInfo p {
    margin: 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#cssEditorInfo p strong {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

#cssEditorInfo p span {
    color: #333;
    font-weight: 500;
    font-size: 1rem;
}

#cssEditorInfo label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: #333;
    padding: 8px 0;
    transition: color 0.2s;
}

#cssEditorInfo label:hover {
    color: var(--color-accent);
}

#cssEditorInfo input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--color-accent);
}

/* Template Modal */
.template-item {
    transition: all 0.2s;
}

.template-item:hover {
    transform: translateY(-2px);
}

#templateList {
    padding: 8px 0;
}

#templateList::-webkit-scrollbar {
    width: 8px;
}

#templateList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#templateList::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#templateList::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#cssEditorInfo label span {
    user-select: none;
}

/* Crypto Payments */
.crypto-payment-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.crypto-payment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.crypto-payment-item.pending {
    border-left: 4px solid #f39c12;
}

.crypto-payment-item.confirmed {
    border-left: 4px solid #27ae60;
}

.crypto-payment-item.failed {
    border-left: 4px solid #e74c3c;
}

.crypto-payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.crypto-payment-header h4 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
}

.crypto-payment-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.crypto-payment-status.pending {
    background: #fff3cd;
    color: #856404;
}

.crypto-payment-status.confirmed {
    background: #d4edda;
    color: #155724;
}

.crypto-payment-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.crypto-payment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.crypto-payment-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.crypto-payment-info-item label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.crypto-payment-info-item span {
    font-size: 0.95rem;
    color: #333;
    word-break: break-all;
    font-weight: 500;
}

.check-payment-btn {
    margin-top: 8px;
}

/* Crypto Wallet Settings */
.crypto-wallet-setting {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    transition: box-shadow 0.2s;
}

.crypto-wallet-setting:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.crypto-wallet-setting h3 {
    margin: 0 0 24px 0;
    color: #1a1a1a;
    font-size: 1.3rem;
    font-weight: 700;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.crypto-wallet-setting form {
    display: grid;
    gap: 20px;
    max-width: 100%;
}

.crypto-wallet-setting .form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.crypto-wallet-setting .form-row > * {
    flex: 1;
}

.crypto-wallet-setting label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.crypto-wallet-setting input[type="text"],
.crypto-wallet-setting input[type="url"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.crypto-wallet-setting input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 8px;
}

/* Site Texts Editor */
.site-texts-section {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    background: #f8f9fa;
    margin-bottom: 24px;
}

.site-texts-section h4 {
    margin: 0 0 20px 0;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.toast {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #27ae60;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.warning {
    border-left: 4px solid #f39c12;
}

.toast.info {
    border-left: 4px solid #3498db;
}

.toast-message {
    flex: 1;
    color: #333;
    font-size: 0.95rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.toast-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Filter Toggle (адмін: поверх style.css — розміри треку; чекбокс — з style.css overlay) */
.filter-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    width: 50px;
    height: 26px;
    background: #c5cad3;
    border-radius: 13px;
    transition: background 0.3s;
    margin-left: 12px;
    pointer-events: none;
    box-sizing: border-box;
    z-index: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-toggle input[type="checkbox"]:checked + .toggle-switch {
    background: var(--color-accent);
}

.filter-toggle input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translateX(24px);
}

.admin-settings .admin-settings-toggle .toggle-switch {
    margin-left: 0;
}

/* Admin Settings */
.admin-settings {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    max-width: 100%;
}

.admin-settings h3 {
    margin: 0 0 16px 0;
    color: #1a1a1a;
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-settings-subsection + .admin-settings-subsection {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e0e4e8;
}

.admin-settings-hint {
    font-size: 0.9rem;
    color: #5a6570;
    line-height: 1.5;
    margin: 0 0 16px 0;
    max-width: 56rem;
}

.admin-settings-hint--compact {
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.admin-settings-env-hint {
    font-size: 0.9rem;
    color: #9a6b00;
    line-height: 1.45;
    margin: 0 0 16px 0;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #f5e6b8;
    border-radius: 8px;
    max-width: 56rem;
}

.admin-settings-env-hint[hidden] {
    display: none !important;
}

/* Рядок: текст + перемикач — сітка, щоб тумблери не «їхали» до краю */
.admin-settings-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 20px;
    row-gap: 8px;
    padding: 12px 0;
}

.admin-settings-row + .admin-settings-row {
    border-top: 1px solid #eceff2;
    padding-top: 14px;
}

.admin-settings-row__label {
    font-weight: 500;
    color: #2c333a;
    line-height: 1.45;
    margin: 0;
    padding-right: 8px;
}

.admin-settings-row__control {
    flex-shrink: 0;
    min-width: 56px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    overflow: visible;
}

.admin-settings-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 4px;
}

.admin-settings-status {
    margin: 0;
    min-height: 0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 100%;
}

.admin-settings-status:empty {
    display: none;
}

.admin-settings-actions .admin-settings-status.form-status:not(:empty) {
    margin-top: 0;
    background: #fffbeb;
    color: #7a5a00;
    border: 1px solid #f0e0a8;
}

.admin-settings-export {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

/* Єдині висота/радіус для кнопок у блоці налаштувань */
.btn.btn--admin-settings {
    min-height: 44px;
    padding: 10px 22px;
    font-size: 0.95rem;
    border-radius: 10px;
    font-weight: 600;
}

.btn.btn--admin-settings.primary {
    box-shadow: 0 2px 10px rgba(var(--color-accent-rgb), 0.25);
}

.btn.btn--admin-settings.outline {
    background: #fff;
    border-width: 1.5px;
}

@media (max-width: 520px) {
    .admin-settings-row {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }

    .admin-settings-row__control {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-settings-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-settings-actions .btn.btn--admin-settings {
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-main {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        position: static;
    }

    .admin-sidebar ul {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    
    .admin-sidebar li {
        width: 100%;
    }
    
    .admin-nav-link {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .admin-login-container {
        padding: 16px;
    }

    .admin-login-box {
        padding: 32px 24px;
        max-width: 100%;
    }

    .admin-login-box h1 {
        font-size: 1.75rem;
    }

    .admin-login-box h3 {
        font-size: 0.95rem;
        margin-bottom: 24px;
    }

    .admin-login-box input[type="password"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .admin-header-content {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .admin-header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-content {
        padding: 20px;
    }

    .admin-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .new-post-btn {
        width: 100%;
    }

    .admin-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-tools input {
        width: 100%;
        min-width: auto;
    }

    .admin-bulk {
        width: 100%;
        flex-direction: column;
    }

    .admin-bulk button {
        width: 100%;
    }

    .admin-post-item,
    .admin-contact-item,
    .admin-order-item,
    .admin-user-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-post-actions,
    .admin-contact-actions,
    .admin-user-actions {
        flex-direction: row;
        justify-content: flex-start;
    }

    .order-quick-edit {
        flex-direction: column;
    }

    .order-quick-edit select {
        width: 100%;
    }

    .css-editor-toolbar {
        flex-direction: column;
    }

    .css-editor-toolbar select {
        width: 100%;
        min-width: auto;
    }

    .css-editor-toolbar button {
        width: 100%;
    }

    #cssEditorInfo {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #cssEditorInfo p {
        margin-bottom: 0;
    }

    .crypto-payment-info {
        grid-template-columns: 1fr;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 24px;
        margin: 5% auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }

    .admin-content h2 {
        font-size: 1.5rem;
    }

    .admin-section-header {
        padding-bottom: 16px;
    }

    /* Touch-friendly buttons */
    button, .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    /* Forms */
    input, textarea, select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 16px;
    }

    /* Tables - make scrollable */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* CodeMirror editor */
    .CodeMirror {
        height: 400px;
        font-size: 13px;
    }

    #cssEditor {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .admin-login-box {
        padding: 24px 20px;
    }

    .admin-login-box h1 {
        font-size: 1.5rem;
    }

    .admin-header h1 {
        font-size: 1.2rem;
    }

    .admin-content {
        padding: 16px;
    }

    .admin-section h2 {
        font-size: 1.3rem;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .stat-card h3 {
        font-size: 0.75rem;
    }

    .dashboard-stats {
        gap: 12px;
    }

    .admin-sidebar {
        padding: 16px;
    }

    .admin-nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .modal-content {
        padding: 20px 16px;
    }

    .modal-content h3 {
        font-size: 1.3rem;
    }

    .CodeMirror {
        height: 350px;
        font-size: 12px;
    }

    #cssEditor {
        min-height: 350px;
    }

    .template-item {
        padding: 16px;
    }

    .template-item h4 {
        font-size: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #999;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e0e0e0;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
    color: #666;
}

/* Additional improvements */
#adminApp * {
    box-sizing: border-box;
}

#adminApp h1, #adminApp h2, #adminApp h3, #adminApp h4 {
    margin-top: 0;
}

#adminApp p {
    margin: 0.5em 0;
    line-height: 1.6;
}

/* Better spacing for sections */
.admin-section > *:first-child {
    margin-top: 0;
}

.admin-section > *:last-child {
    margin-bottom: 0;
}

/* Improve select styling */
#adminApp select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* Improve checkbox styling */
#adminApp input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--color-accent);
}

/* File input styling */
#adminApp input[type="file"] {
    padding: 8px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: border-color 0.2s;
}

#adminApp input[type="file"]:hover {
    border-color: var(--color-accent);
}

/* Improve scrollbar */
#adminApp ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#adminApp ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#adminApp ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#adminApp ::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Прев’ю локації в формі тарифу: компактна іконка + маленький прапор */
#adminApp .location-flag-preview {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Обмеження образів ОС у тарифі */
#adminApp .post-allowed-os-wrap {
    max-height: 280px;
    overflow: auto;
    padding: 10px 12px;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    background: #fff;
    margin-top: 6px;
}

#adminApp .post-allowed-os-group {
    margin-bottom: 12px;
}

#adminApp .post-allowed-os-group:last-child {
    margin-bottom: 0;
}

#adminApp .post-allowed-os-group strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #333;
}

#adminApp .post-allowed-os-group-items label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.9rem;
}
