/**
 * Admin Dashboard Styles
 *
 * Styles for admin transaction management interface
 */

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.login-box .subtitle {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

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

.login-form input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #5568d3;
}

/* Admin Dashboard */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

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

.admin-header h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-info span {
    color: #666;
    font-size: 14px;
}

.admin-info strong {
    color: #333;
    text-transform: uppercase;
}

.btn-logout {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

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

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

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Transactions Section */
.transactions-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.transactions-section h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

.help-text {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Transactions Table */
.transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.transactions-table thead {
    background: #f8f9fa;
}

.transactions-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
    color: #333;
}

.transactions-table tbody tr {
    transition: background 0.2s;
}

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

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

/* Buttons */
.btn-void {
    padding: 6px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

.btn-secondary {
    padding: 10px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* No Transactions */
.no-transactions {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-transactions p {
    margin: 0;
    font-size: 16px;
}

/* Actions Section */
.actions-section {
    text-align: right;
    padding: 20px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.modal-content p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.modal-content p strong {
    color: #333;
}

.modal-content .warning {
    color: #dc3545;
    font-weight: 600;
    margin-top: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: flex-end;
}

/* Loading Overlay */
#loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2000;
}

#loading-overlay p {
    color: white;
    font-size: 18px;
    margin-top: 20px;
}

/* Spinner */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-button {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #333;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

/* Info Card */
.info-card {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-left: 4px solid #2196f3;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-card h3 {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 18px;
}

.info-card h4 {
    margin: 15px 0 8px 0;
    color: #333;
    font-size: 15px;
}

.info-card p {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.info-card ul {
    margin: 0 0 15px 20px;
    color: #555;
    font-size: 14px;
}

.info-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.info-card code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #d32f2f;
}

.warning-text {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

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

/* Button Spinner */
.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner-small {
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 0.8s linear infinite;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Text */
.loading-text {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .transactions-table {
        font-size: 12px;
    }

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

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .transactions-section {
        padding: 20px;
        overflow-x: auto;
    }

    .transactions-table {
        min-width: 800px;
    }

    .modal-content {
        margin: 20px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
    }
}
