/* Admin Panel Custom Styles - Modern Sidebar Design */

:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
}

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

body {
    background-color: #f8fafc;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #334155;
}

/* Layout Structure */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--text-white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.brand-text {
    margin-left: 0.75rem;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--sidebar-hover);
    color: var(--text-white);
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

/* Navigation Styles */
.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--text-white);
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.nav-text {
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar.collapsed .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #334155;
}

.admin-info {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .admin-info {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.admin-details {
    flex: 1;
}

.admin-name {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-white);
}

.admin-role {
    color: var(--text-light);
    font-size: 0.75rem;
}

.logout-btn {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.sidebar.collapsed .logout-btn .nav-text {
    display: none;
}

/* Content Area */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed + .content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Header */
.top-header {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    margin-left: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
}

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

/* Content Body */
.content-body {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
}

/* Content Footer */
.content-footer {
    background: white;
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    background: white;
}

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

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.card-body {
    padding: 1.5rem;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-card p {
    margin-bottom: 0;
    opacity: 0.9;
}

.table {
    background-color: white;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.badge.bg-success {
    background: var(--success-color) !important;
}

.badge.bg-warning {
    background: var(--warning-color) !important;
}

.badge.bg-danger {
    background: var(--danger-color) !important;
}

.badge.bg-info {
    background: var(--info-color) !important;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #312e81);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Enhanced Table Styles */
.table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: #475569;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-text {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stats-card .card-body {
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card p {
    margin-bottom: 0;
    opacity: 0.9;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
    }

    .sidebar.collapsed + .content {
        margin-left: 0;
    }

    .top-header {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.5rem;
        margin-left: 0.5rem;
    }

    .content-body {
        padding: 1rem;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stats-card h3 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-right {
        width: 100%;
    }

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

    .page-title {
        font-size: 1.25rem;
    }

    .content-body {
        padding: 0.75rem;
    }

    .card-body {
        padding: 1rem;
    }

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

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.border-radius-lg {
    border-radius: 12px !important;
}

.border-radius-xl {
    border-radius: 16px !important;
}

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

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Enhanced Modal Styles */
.modal-xl {
    max-width: 1200px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.transaction-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-content {
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem 2rem;
}

.modal-body .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modal-body .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.modal-body .card-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0) !important;
    border-bottom: 2px solid var(--border-color) !important;
}

.modal-body code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

/* Status Badge Colors */
.badge.bg-success {
    background: linear-gradient(135deg, var(--success-color), #059669) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
}

/* Transaction Type Colors */
.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

/* Copy Button Animation */
.btn-outline-primary:hover {
    transform: scale(1.05);
}

/* Copy Button Styles */
.copy-btn, .btn[onclick*="copyToClipboard"] {
    transition: all 0.2s ease;
    cursor: pointer;
}

.copy-btn:hover, .btn[onclick*="copyToClipboard"]:hover {
    transform: scale(1.1);
}

/* Input Group Copy Buttons */
.input-group .btn {
    border-left: none;
}

.input-group .form-control:focus + .btn {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.25);
}

/* Success state for copy buttons */
.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669) !important;
    border-color: var(--success-color) !important;
}

/* Toast Notifications */
.alert.position-fixed {
    animation: slideInRight 0.3s ease-out;
}

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

.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

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

.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    border-radius: 15px 15px 0 0;
    padding: 2rem 1rem 1rem;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-confirmed {
    background-color: #198754;
    color: #fff;
}

.status-failed {
    background-color: #dc3545;
    color: #fff;
}

.status-cancelled {
    background-color: #6c757d;
    color: #fff;
}

.transaction-type-deposit {
    color: #198754;
}

.transaction-type-withdraw {
    color: #dc3545;
}

.transaction-type-internal {
    color: #0d6efd;
}

.token-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

.copy-btn {
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: #0d6efd;
}

.dashboard-stats {
    margin-bottom: 2rem;
}

.recent-activity {
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .stats-card h3 {
        font-size: 2rem;
    }
}
