/**
 * VPS Server Manager - Custom Styles
 */

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    background-color: #212529;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #0d6efd;
}

.sidebar h5 {
    padding: 0 1rem;
    margin-bottom: 1rem;
}

/* Main Content */
main {
    padding-top: 20px;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Statistics Cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0d6efd;
}

.stat-card p {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.stat-card.danger h3 {
    color: #dc3545;
}

.stat-card.success h3 {
    color: #198754;
}

.stat-card.warning h3 {
    color: #ffc107;
}

.stat-card.info h3 {
    color: #0dcaf0;
}

/* Tables */
.table {
    background-color: #fff;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

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

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

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Buttons */
.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

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

/* Forms */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

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

/* Login Page */
.min-vh-100 {
    min-height: 100vh;
}

/* Modals */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 2rem;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.375rem;
}

/* Dropdown */
.dropdown-menu {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 767.98px) {
    .sidebar {
        position: relative;
        padding: 0;
    }
    
    main {
        padding-top: 10px;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }
}

/* Utility Classes */
.text-muted {
    color: #6c757d !important;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Toast Notifications */
.toast {
    min-width: 250px;
}

/* Payment Due Warnings */
.payment-due-soon {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.payment-overdue {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

/* Server Status Indicators */
.status-active {
    color: #198754;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    main {
        margin-left: 0 !important;
    }
    
    .card {
        break-inside: avoid;
    }
}
