/* Main CSS for Domain & Subscription Tracker */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --light-color: #f8fafc;
    --dark-color: #0f172a;
}

/* Light theme styles */
[data-bs-theme="light"] {
    --bs-body-bg: #f8fafc;
    --custom-card-bg: #ffffff;
    --custom-border-color: #e2e8f0;
    --custom-text-muted: #64748b;
}

/* Dark theme styles */
[data-bs-theme="dark"] {
    --bs-body-bg: #0f172a;
    --custom-card-bg: #1e293b;
    --custom-border-color: #334155;
    --custom-text-muted: #94a3b8;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bs-body-bg);
    transition: background-color 0.3s ease;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--custom-border-color);
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    font-size: 1.25rem;
}

/* Cards */
.card {
    background-color: var(--custom-card-bg);
    border: 1px solid var(--custom-border-color);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--custom-border-color);
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

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

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

/* Tables */
.table {
    background-color: var(--custom-card-bg);
}

.table th {
    border-top: none;
    font-weight: 600;
    color: var(--custom-text-muted);
    background-color: transparent;
    border-bottom: 2px solid var(--custom-border-color);
    cursor: pointer;
    user-select: none;
}

.table th:hover {
    background-color: var(--custom-border-color);
}

.table th.sortable::after {
    content: ' ↕';
    opacity: 0.3;
}

.table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

.table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

.table tbody tr {
    border-bottom: 1px solid var(--custom-border-color);
}

.table tbody tr:hover {
    background-color: var(--custom-border-color);
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-success {
    background-color: #dcfce7;
    color: #166534;
}

.status-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

[data-bs-theme="dark"] .status-success {
    background-color: #166534;
    color: #dcfce7;
}

[data-bs-theme="dark"] .status-info {
    background-color: #1e40af;
    color: #dbeafe;
}

[data-bs-theme="dark"] .status-warning {
    background-color: #92400e;
    color: #fef3c7;
}

[data-bs-theme="dark"] .status-danger {
    background-color: #991b1b;
    color: #fee2e2;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Dashboard stats cards */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    color: var(--custom-text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

/* Loading spinner */
#loading-spinner {
    z-index: 9999;
}

/* Toast notifications */
.toast {
    max-width: 400px;
}

/* Theme toggle */
#theme-toggle {
    border: none;
    background: none;
    font-size: 1.25rem;
    padding: 0.25rem;
    border-radius: 0.375rem;
}

#theme-toggle:hover {
    background-color: var(--custom-border-color);
}

/* Login page specific styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--custom-text-muted);
    margin-bottom: 0;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .stat-card .stat-value {
        font-size: 2rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}