/* Common styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --sidebar-width: 250px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f8fa;
}

/* Sidebar styles */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--dark-color);
    color: white;
    padding: 1rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    padding: 0.5rem;
    text-align: center;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1rem;
    margin: 0.2rem 0;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar .nav-link i {
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

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

/* Main content styles */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

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

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

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    border-radius: 1rem 1rem 0 0 !important;
}

.card-body {
    padding: 1.25rem;
}

/* Stats card */
.stats-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.stats-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.stats-card .details h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
}

.stats-card .details p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Action cards */
.action-card {
    text-align: center;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-card:hover {
    background-color: var(--light-color);
}

.action-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.action-card h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Table styles */
.table {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: none;
    padding: 1rem;
    font-weight: 600;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

/* Badge styles */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* Loading spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Alert styles */
.alert {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Modal styles */
.modal-content {
    border: none;
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}

/* Affiliate link section */
.affiliate-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.affiliate-section .input-group {
    max-width: 500px;
    margin: 1rem auto;
}

.affiliate-link {
    background: var(--light-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-family: monospace;
    margin: 1rem 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

/* Public page styles */
.public-page {
    margin-left: 0 !important;
}

.public-page .navbar {
    background: var(--dark-color);
    padding: 1rem 2rem;
}

.public-page .navbar-brand {
    color: white;
    font-weight: bold;
}

.affiliate-banner {
    background: linear-gradient(45deg, var(--primary-color), var(--info-color));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.affiliate-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.affiliate-features {
    padding: 4rem 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Custom Modal Styles */
.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 1rem 1rem 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
    border-radius: 0 0 1rem 1rem;
}

/* Custom Alert Modal */
.custom-alert-modal .modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 400px;
}

.custom-alert-modal .modal-content {
    text-align: center;
}

.custom-alert-modal .modal-header {
    justify-content: center;
    padding: 1.5rem;
}

.custom-alert-modal .modal-body {
    padding: 2rem 1.5rem;
}

.custom-alert-modal .modal-footer {
    justify-content: center;
    padding: 1.5rem;
}

.custom-alert-modal .btn {
    min-width: 100px;
    font-weight: 500;
}

.custom-alert-modal .btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border: none;
}

.custom-alert-modal .btn-secondary {
    background: var(--secondary-color);
    border: none;
}
