/* Pretty select for role selection */
.pretty-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 40px 10px 12px;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2399A3B0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>') no-repeat right 12px center;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.pretty-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.pretty-select.role-select option[value="superadmin"] { color: #b91c1c; font-weight: 600; }
.pretty-select.role-select option[value="admin"] { color: #dc2626; }
.pretty-select.role-select option[value="supermanager"] { color: #2563eb; }
.pretty-select.role-select option[value="manager"] { color: #111827; }

@media (max-width: 600px) {
    .pretty-select { font-size: 16px; }
}
/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f5f6f8;
    color: #101828;
    min-height: 100vh;
    color: #333;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.06);
    max-width: 450px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #5b58eb 0%, #7c6cf5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #fcc;
}

/* PIN Input Styles */
.pin-input-container {
    width: 100%;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.pin-digit {
    width: 50px;
    height: 50px;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    background: white;
    transition: all 0.3s;
}

.pin-digit.filled {
    border-color: #4f46e5;
    background: #f8f9ff;
}

.pin-digit.active {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pin-keypad {
    max-width: 300px;
    margin: 0 auto;
}

.keypad-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.keypad-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.keypad-btn:hover:not(:disabled) {
    background: #e9ecef;
    transform: scale(1.05);
}

.keypad-btn.number {
    background: white;
    border-color: #dee2e6;
}

.keypad-btn.action {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.keypad-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Dashboard Styles */
.dashboard {
    min-height: 100vh;
    background: #f8f9fa;
}

.dashboard-header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    color: #333;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

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

.dashboard-content {
    padding: 20px;
}

/* Dashboard Navigation */
.dashboard-nav {
    background: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    overflow-x: auto;
}

.nav-btn {
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    color: #333;
    background: #f8f9fa;
}

.nav-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: #f8f9ff;
}

/* Info cards (stats) */
.info-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 0.9em;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #111827;
}

/* Transaction List Styles */
.transaction-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Filters */
.filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Table Styles */
.transaction-table-container {
    overflow-x: auto;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.transaction-table th,
.transaction-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.transaction-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.transaction-table tbody tr:hover {
    background: #f8f9fa;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

.status-badge.paid {
    background: #d4edda;
    color: #155724;
}

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

.status-badge.cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-details {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 10px;
}

.pagination button {
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #007bff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.btn-primary {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination button.btn-outline {
    background: white;
    color: #333;
    border-color: #ddd;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

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

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.amount-group {
    margin-bottom: 15px;
}

.amount-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* Transaction Details */
.transaction-details {
    padding: 20px;
}

.detail-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.detail-item span,
.detail-item p {
    color: #333;
}

.link-display,
.qr-display {
    margin-top: 10px;
}

.link-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    font-family: monospace;
    font-size: 0.9rem;
}

.qr-display {
    text-align: center;
}

.qr-display svg {
    max-width: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Visits Table */
.visits-table {
    margin-top: 10px;
}

.visits-table table {
    width: 100%;
    border-collapse: collapse;
}

.visits-table th,
.visits-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.visits-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.user-agent {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
}

/* Result Display */
.result-display {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-display h4 {
    margin-bottom: 10px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }

    .transaction-table {
        font-size: 0.875rem;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 8px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        gap: 10px;
    }

    .pin-digit {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .keypad-btn {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }

    .login-card {
        padding: 25px;
    }

    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 480px) {
    .dashboard-content {
        padding: 10px;
    }

    .transaction-list {
        padding: 15px;
    }

    .login-card {
        padding: 20px;
    }

    .pin-display {
        gap: 5px;
    }

    .pin-digit {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .keypad-row {
        gap: 10px;
    }

    .keypad-btn {
        width: 45px;
        height: 45px;
        font-size: 14px;
    }
}

/* Loading States */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

/* Role and Status Badges */
.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: #dc3545;
    color: white;
}

.role-badge.manager {
    background: #007bff;
    color: white;
}

.role-badge.superadmin {
    background: #6f42c1; /* фиолетовый */
    color: white;
}

.role-badge.supermanager {
    background: #20c997; /* бирюзовый */
    color: white;
}

.status-badge.active {
    background: #28a745;
    color: white;
}

.status-badge.inactive {
    background: #6c757d;
    color: white;
}

/* Customer/User Tables */
.customer-table-container,
.user-table-container {
    overflow-x: auto;
}

.customer-table,
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.customer-table th,
.customer-table td,
.user-table th,
.user-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.customer-table th,
.user-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.customer-table tbody tr:hover,
.user-table tbody tr:hover {
    background: #f8f9fa;
}

/* Permission Management */
.permission-management {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.permission-content {
    margin-top: 20px;
}

.permission-content h3 {
    color: #333;
    margin-bottom: 10px;
}

.permission-content p {
    color: #666;
    margin-bottom: 25px;
}

.permission-list {
    margin-bottom: 25px;
}

.permission-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.permission-item:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.permission-label {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 0;
}

.permission-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permission-info {
    flex: 1;
}

.permission-info strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.permission-info small {
    color: #666;
    font-size: 0.875rem;
}

.permission-actions {
    text-align: center;
    margin-bottom: 20px;
}

.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}

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

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

/* User Management */
.user-management {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Customer List */
.customer-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Transaction Details */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.link-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-container input {
    flex: 1;
    font-family: monospace;
    font-size: 0.9rem;
}

.link-container button {
    white-space: nowrap;
}

/* Statistics Panel Styles */
.statistics-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stat-card.success {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.stat-card.pending {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
}

.stat-card.failed {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
}

.stat-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    opacity: 0.8;
}

.stat-card.success .stat-icon {
    color: #28a745;
}

.stat-card.pending .stat-icon {
    color: #ffc107;
}

.stat-card.failed .stat-icon {
    color: #dc3545;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

.stat-card.success .stat-amount {
    color: #28a745;
}

.stat-card.pending .stat-amount {
    color: #ffc107;
}

.stat-card.failed .stat-amount {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-icon {
        font-size: 2rem;
        margin-right: 10px;
    }
}

/* Today Statistics Styles */
.today-statistics {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.today-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f8f9fa;
}

.today-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.today-header i {
    color: #6c757d;
}

.today-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.today-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: #6c757d;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6c757d;
}

.today-stat strong {
    color: #495057;
    font-weight: 700;
}

.today-stat.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.today-stat.success strong {
    color: #28a745;
}

.today-stat.pending {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.today-stat.pending strong {
    color: #ffc107;
}

.today-stat.failed {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.today-stat.failed strong {
    color: #dc3545;
}

.today-stat.amount {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.today-stat.amount strong {
    color: #17a2b8;
}

/* Responsive adjustments for today stats */
@media (max-width: 768px) {
    .today-stats {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .today-stat {
        justify-content: center;
        text-align: center;
    }
}

/* User Management Additional Styles */
.user-name {
    font-weight: 500;
}

.text-muted {
    color: #6c757d;
    font-size: 0.875rem;
}

.creator-info {
    font-size: 0.875rem;
}

.creator-info small {
    display: block;
    margin-top: 2px;
}

/* ─────────── Mercury refinements (новый дизайн) ─────────── */
:root{
  --cp-bg:#f5f6f8; --cp-card:#fff; --cp-border:#eceef1; --cp-border-strong:#e4e7ec;
  --cp-text:#101828; --cp-muted:#667085; --cp-faint:#98a2b3;
  --cp-accent:#4f46e5; --cp-accent-grad:linear-gradient(135deg,#5b58eb 0%,#7c6cf5 100%);
  --cp-ok:#067647; --cp-ok-bg:#ecfdf3; --cp-warn:#b54708; --cp-warn-bg:#fef6e7; --cp-err:#b42318; --cp-err-bg:#fef3f2;
}
.login-card,.payment-card,.modal-content,.info-card,.detail-section,.customer-table-container{
  border:1px solid var(--cp-border); box-shadow:0 1px 3px rgba(16,24,40,.06);
}
.form-group input,.filter-group select,.link-input,.amount-group input{
  border:1px solid var(--cp-border-strong)!important; border-radius:12px!important;
  background:#f9fafb; transition:box-shadow .15s,border-color .15s;
}
.form-group input:focus,.filter-group select:focus,.link-input:focus{
  border-color:var(--cp-accent)!important; box-shadow:0 0 0 3px rgba(79,70,229,.12)!important; background:#fff; outline:none;
}
.btn-primary,.login-btn{
  background:var(--cp-accent-grad)!important; border:none!important; border-radius:12px!important;
  font-weight:700; box-shadow:0 6px 16px rgba(91,88,235,.28);
}
.btn-primary:hover,.login-btn:hover:not(:disabled){filter:brightness(1.03); transform:translateY(-1px);}
.btn-secondary{border-radius:12px!important; border:1px solid var(--cp-border-strong)!important; background:#fff!important; color:var(--cp-text)!important; font-weight:700;}
.btn-danger{border-radius:12px!important; background:var(--cp-err)!important; font-weight:700;}
.dashboard-nav button.active,.dashboard-nav .active{color:var(--cp-accent)!important;}
.customer-table th,.detail-section h4{color:var(--cp-faint);}
.message.success{background:var(--cp-ok-bg); color:var(--cp-ok);}
.message.error{background:var(--cp-err-bg); color:var(--cp-err);}
.modal-content{border-radius:20px;}

/* ── Mercury: карточки-метрики (белые, деликатный акцент) ── */
.stats-grid{ gap:16px; }
.stat-card{ background:#fff!important; border:1px solid var(--cp-border)!important; border-left:1px solid var(--cp-border)!important; border-radius:16px!important; box-shadow:0 1px 3px rgba(16,24,40,.06)!important; gap:14px; }
.stat-card:hover{ transform:none!important; box-shadow:0 2px 8px rgba(16,24,40,.08)!important; }
.stat-card.success,.stat-card.pending,.stat-card.failed{ background:#fff!important; }
.stat-icon{ font-size:1.05rem!important; width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:#f4f4f5; color:var(--cp-muted)!important; flex-shrink:0; }
.stat-card.success .stat-icon{ background:var(--cp-ok-bg); color:var(--cp-ok)!important; }
.stat-card.pending .stat-icon{ background:var(--cp-warn-bg); color:var(--cp-warn)!important; }
.stat-card.failed .stat-icon{ background:var(--cp-err-bg); color:var(--cp-err)!important; }
.stat-value{ font-size:1.7rem!important; font-weight:800!important; color:var(--cp-text)!important; font-variant-numeric:tabular-nums; letter-spacing:-.5px; }
.stat-label{ color:var(--cp-muted)!important; font-weight:600!important; font-size:.8rem!important; }
.stat-amount{ font-weight:700!important; font-variant-numeric:tabular-nums; margin-top:2px; }
.stat-card.success .stat-amount{ color:var(--cp-ok)!important; }
.stat-card.pending .stat-amount{ color:var(--cp-warn)!important; }
.stat-card.failed .stat-amount{ color:var(--cp-err)!important; }

/* ─────────── Mercury: оболочка приложения (боковое меню) ─────────── */
.cp-shell{ display:flex; height:100vh; overflow:hidden; background:var(--cp-bg); }
.cp-sidebar{ width:244px; flex-shrink:0; background:#fff; border-right:1px solid var(--cp-border); display:flex; flex-direction:column; padding:20px 14px; position:sticky; top:0; height:100vh; }
.cp-brand{ display:flex; align-items:center; gap:10px; padding:0 8px 22px; }
.cp-brandmark{ width:34px; height:34px; border-radius:10px; background:var(--cp-accent-grad); display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px rgba(91,88,235,.35); }
.cp-brandname{ font-size:17px; font-weight:800; letter-spacing:-.3px; color:var(--cp-text); }
.cp-nav{ display:flex; flex-direction:column; gap:3px; }
.cp-navitem{ display:flex; align-items:center; gap:11px; padding:11px 12px; border:none; background:none; border-radius:11px; font-family:inherit; font-size:14px; font-weight:600; color:#344054; cursor:pointer; text-align:left; width:100%; transition:background .12s; }
.cp-navitem i{ width:20px; text-align:center; color:#667085; font-size:15px; }
.cp-navitem:hover{ background:#f6f7f9; }
.cp-navitem.active{ background:#eef2ff; color:var(--cp-accent); }
.cp-navitem.active i{ color:var(--cp-accent); }
.cp-userbox{ margin-top:auto; display:flex; align-items:center; gap:10px; padding:12px 8px 4px; border-top:1px solid var(--cp-border); }
.cp-avatar{ width:36px; height:36px; border-radius:10px; background:var(--cp-accent-grad); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; flex-shrink:0; }
.cp-usermeta{ flex:1; min-width:0; }
.cp-username{ font-size:12px; font-weight:700; color:var(--cp-text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cp-userrole{ font-size:11px; color:var(--cp-faint); font-weight:600; }
.cp-logout{ border:none; background:none; color:#98a2b3; cursor:pointer; padding:7px; border-radius:8px; }
.cp-logout:hover{ background:var(--cp-err-bg); color:var(--cp-err); }
.cp-main{ flex:1; min-width:0; height:100vh; overflow-y:auto; display:flex; flex-direction:column; }
.cp-topbar{ height:64px; background:#fff; border-bottom:1px solid var(--cp-border); display:flex; align-items:center; justify-content:space-between; padding:0 28px; position:sticky; top:0; z-index:10; }
.cp-sectiontitle{ font-size:20px; font-weight:800; letter-spacing:-.4px; color:var(--cp-text); }
.cp-iconbtn{ position:relative; width:40px; height:40px; border:1px solid var(--cp-border); background:#fff; border-radius:11px; color:#667085; cursor:pointer; }
.cp-iconbtn:hover{ background:#f6f7f9; }
.cp-badge{ position:absolute; top:-6px; right:-6px; background:var(--cp-err); color:#fff; border-radius:999px; min-width:18px; height:18px; padding:0 5px; display:flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; border:2px solid #fff; }
.cp-content{ padding:24px 28px; flex:1; }
.cp-mobilebar{ display:none; }
@media (max-width:900px){
  .cp-sidebar{ display:none; }
  .cp-content{ padding:16px 14px 90px; }
  .cp-topbar{ padding:0 16px; }
  .cp-mobilebar{ display:flex; position:fixed; bottom:0; left:0; right:0; height:72px; background:#fff; border-top:1px solid var(--cp-border); box-shadow:0 -2px 12px rgba(16,24,40,.05); z-index:50; padding-top:8px; }
  .cp-mobilebar button{ flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; border:none; background:none; color:#98a2b3; font-family:inherit; font-size:11px; font-weight:600; cursor:pointer; }
  .cp-mobilebar button i{ font-size:18px; }
  .cp-mobilebar button.active{ color:var(--cp-accent); }
}

/* ═══════════ Mercury: полный слой на все экраны (убираем гибрид) ═══════════ */

/* Кнопки — все варианты */
.btn{ border-radius:11px!important; font-family:inherit; font-weight:600!important; border:1px solid transparent; padding:10px 16px; font-size:14px; cursor:pointer; transition:filter .12s,transform .12s,background .12s; display:inline-flex; align-items:center; gap:7px; line-height:1; }
.btn-sm{ padding:7px 12px!important; font-size:13px!important; border-radius:9px!important; }
.btn-primary{ background:var(--cp-accent-grad)!important; color:#fff!important; box-shadow:0 6px 16px rgba(91,88,235,.26); }
.btn-primary:hover:not(:disabled){ filter:brightness(1.04); transform:translateY(-1px); }
.btn-secondary{ background:#fff!important; color:#344054!important; border:1px solid var(--cp-border-strong)!important; }
.btn-secondary:hover{ background:#f6f7f9!important; }
.btn-success{ background:#067647!important; color:#fff!important; }
.btn-info{ background:#eef2ff!important; color:var(--cp-accent)!important; border:1px solid #e0e0f5!important; }
.btn-warning{ background:var(--cp-warn-bg)!important; color:var(--cp-warn)!important; border:1px solid #fedf89!important; }
.btn-danger{ background:#fff!important; color:var(--cp-err)!important; border:1px solid #fecdca!important; }
.btn-danger:hover{ background:var(--cp-err-bg)!important; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

/* Секционные заголовки */
.section-header{ font-size:18px!important; font-weight:800!important; letter-spacing:-.3px; color:var(--cp-text)!important; display:flex; align-items:center; gap:10px; }
.section-header i{ color:var(--cp-accent); }
.section-subheader{ color:var(--cp-muted)!important; font-weight:600; font-size:13px; }
.header-actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* Карточки */
.card,.info-card,.detail-section{ background:#fff!important; border:1px solid var(--cp-border)!important; border-radius:16px!important; box-shadow:0 1px 3px rgba(16,24,40,.06)!important; }
.detail-section h4{ font-size:13px; font-weight:700; color:var(--cp-faint)!important; text-transform:uppercase; letter-spacing:.4px; }

/* Таблицы */
.transaction-table,.customer-table{ width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--cp-border); border-radius:16px; overflow:hidden; box-shadow:0 1px 3px rgba(16,24,40,.06); }
.transaction-table thead th,.customer-table thead th{ background:#fafbfc!important; color:var(--cp-faint)!important; text-transform:uppercase; letter-spacing:.3px; font-size:11.5px!important; font-weight:700!important; padding:13px 16px!important; text-align:left; border-bottom:1px solid var(--cp-border)!important; }
.transaction-table tbody td,.customer-table tbody td{ padding:13px 16px!important; border-bottom:1px solid #f2f4f7!important; font-size:13.5px; color:var(--cp-text); vertical-align:middle; }
.transaction-table tbody tr:last-child td,.customer-table tbody tr:last-child td{ border-bottom:none!important; }
.transaction-table tbody tr:hover td,.customer-table tbody tr:hover td{ background:#fafbfc; }

/* Статусы */
.status-badge,.status-chip{ display:inline-flex; align-items:center; gap:5px; padding:3px 10px!important; border-radius:7px!important; font-size:11px!important; font-weight:700!important; background:#f4f4f5; color:#344054; border:none!important; }
.status-badge.success,.status-badge.paid,.status-chip.success,.status-badge.completed{ background:var(--cp-ok-bg)!important; color:var(--cp-ok)!important; }
.status-badge.pending,.status-chip.pending,.status-badge.awaiting{ background:var(--cp-warn-bg)!important; color:var(--cp-warn)!important; }
.status-badge.failed,.status-badge.cancelled,.status-chip.failed,.status-badge.declined{ background:var(--cp-err-bg)!important; color:var(--cp-err)!important; }

/* Фильтры */
.filters{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:16px 0; padding:16px; background:#fff; border:1px solid var(--cp-border); border-radius:14px; box-shadow:0 1px 3px rgba(16,24,40,.06); }
.filter-group{ display:flex; flex-direction:row; flex-wrap:wrap; gap:10px; align-items:center; }
.filter-group label{ font-size:11px; font-weight:600; color:var(--cp-faint); }
.filters select,.filters input,.form-control,.pretty-select{ height:42px; padding:0 12px; border:1px solid var(--cp-border-strong)!important; border-radius:10px!important; background:#fff!important; font-family:inherit; font-size:13.5px; color:var(--cp-text); }
.form-control:focus,.filters select:focus,.filters input:focus{ outline:none; border-color:var(--cp-accent)!important; box-shadow:0 0 0 3px rgba(79,70,229,.12)!important; }

/* Инфо-пары */
.info-label{ color:var(--cp-muted)!important; font-size:12px; font-weight:500; }
.info-value{ color:var(--cp-text)!important; font-weight:600; font-size:14px; }
.detail-item label{ color:var(--cp-faint)!important; font-size:12px; font-weight:600; }
.text-muted{ color:var(--cp-faint)!important; }

/* Модалки */
.modal-overlay{ background:rgba(29,41,57,.55)!important; backdrop-filter:blur(2px); }
.modal-content{ background:#fff!important; border:1px solid var(--cp-border)!important; border-radius:20px!important; box-shadow:0 24px 60px rgba(16,24,40,.28)!important; }
.modal-header{ padding:20px 22px!important; border-bottom:1px solid #f2f4f7!important; }
.modal-header h3{ font-size:18px; font-weight:800; letter-spacing:-.3px; color:var(--cp-text); }
.modal-actions{ padding:18px 22px!important; border-top:1px solid #f2f4f7!important; gap:10px; display:flex; }
.close-btn{ border:none; background:#f4f4f5; color:var(--cp-muted); width:34px; height:34px; border-radius:9px; cursor:pointer; }
.close-btn:hover{ background:#e4e7ec; }

/* Формы */
.form-group label{ font-size:13px!important; font-weight:600!important; color:#344054!important; margin-bottom:7px; }

/* Чипы «за сегодня» */
.today-stat{ border-radius:8px; font-weight:600; }

/* Роль-плашки (Mercury) */
.role-badge{ display:inline-flex; align-items:center; padding:3px 10px; border-radius:7px; font-size:11px; font-weight:700; text-transform:none; background:#f4f4f5; color:#344054; }
.role-badge.superadmin{ background:#eef2ff; color:#4f46e5; }
.role-badge.admin{ background:#fef3f2; color:#b42318; }
.role-badge.supermanager{ background:#eff8ff; color:#175cd3; }
.role-badge.manager{ background:#f4f4f5; color:#344054; }
.role-badge.exchanger{ background:#ecfdf3; color:#067647; }
.status-badge.active{ background:#ecfdf3!important; color:#067647!important; }
.status-badge.inactive{ background:#fef3f2!important; color:#b42318!important; }

/* ═══════════ Mercury: экран входа (по макету) ═══════════ */
.login-container{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; background:var(--cp-bg); }
.login-card{ background:#fff!important; border:1px solid var(--cp-border)!important; border-radius:20px!important; box-shadow:0 4px 24px rgba(16,24,40,.06)!important; padding:32px 28px!important; max-width:420px; width:100%; }
.login-brand{ display:flex; flex-direction:column; align-items:center; margin-bottom:26px; }
.login-mark{ width:58px; height:58px; border-radius:17px; background:var(--cp-accent-grad); display:flex; align-items:center; justify-content:center; box-shadow:0 8px 22px rgba(91,88,235,.34); margin-bottom:16px; }
.login-name{ font-size:23px; font-weight:800; letter-spacing:-.4px; color:var(--cp-text); }
.login-sub{ font-size:14px; color:var(--cp-muted); font-weight:500; margin-top:4px; }
.login-secure{ display:flex; align-items:center; justify-content:center; gap:7px; margin-top:20px; font-size:12px; color:var(--cp-faint); font-weight:500; }
.login-btn{ width:100%; height:52px; }

/* ПИН: ячейки */
.pin-input-container{ display:flex; flex-direction:column; gap:16px; }
.pin-display{ display:flex; gap:8px; justify-content:center; }
.pin-digit{ flex:1; max-width:52px; height:52px; border:1px solid var(--cp-border-strong); border-radius:12px; background:#f9fafb; display:flex; align-items:center; justify-content:center; font-size:18px; color:var(--cp-text); transition:box-shadow .12s,border-color .12s; }
.pin-digit.active{ border-color:var(--cp-accent); box-shadow:0 0 0 3px rgba(79,70,229,.12); background:#fff; }
.pin-digit.filled{ background:#fff; }
/* ПИН: клавиатура */
.pin-keypad{ display:flex; flex-direction:column; gap:10px; }
.keypad-row{ display:flex; gap:10px; justify-content:center; }
.keypad-btn{ flex:1; max-width:78px; height:50px; border-radius:14px; border:1px solid var(--cp-border); background:#fff; font-family:inherit; font-size:18px; font-weight:600; color:var(--cp-text); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .12s; }
.keypad-btn:hover:not(:disabled){ background:#f6f7f9; }
.keypad-btn.action{ background:#fff!important; color:var(--cp-muted)!important; border:1px solid var(--cp-border)!important; }
.keypad-btn.action:hover:not(:disabled){ background:#f6f7f9!important; }
.keypad-btn:disabled{ opacity:.45; cursor:default; }

/* Статусы — обычный регистр (не капс) */
.status-badge,.status-chip{ text-transform:none!important; }
/* Действия в таблице транзакций — единый спокойный вид вместо радуги */
.transaction-table td .btn{ background:#f6f7f9!important; color:#344054!important; border:1px solid var(--cp-border)!important; box-shadow:none!important; font-weight:600; }
.transaction-table td .btn:hover{ background:#eef2ff!important; color:var(--cp-accent)!important; border-color:#e0e0f5!important; }
.transaction-table td .btn i{ color:inherit!important; }
