/* Dashboard Styles - Modern Dark Theme */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.logo i {
    font-size: 1.5rem;
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
    flex: 1;
}

.nav-menu li {
    margin: 4px 12px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-menu a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

.nav-menu li.active a {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: var(--bg-card);
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
}

.user-info i {
    font-size: 1.75rem;
    color: var(--primary);
}

.content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.card-icon.blue { background: rgba(59, 130, 246, 0.2); color: var(--primary); }
.card-icon.green { background: rgba(34, 197, 94, 0.2); color: var(--success); }
.card-icon.orange { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.card-icon.red { background: rgba(239, 68, 68, 0.2); color: var(--danger); }

.card-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-fill.green { background: var(--success); }
.progress-fill.yellow { background: var(--warning); }
.progress-fill.red { background: var(--danger); }

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-dark);
}

.login-box {
    background: var(--bg-card);
    padding: 48px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.875rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--border);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Service Cards */
.service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
}

.service-info h4 {
    font-weight: 600;
    margin-bottom: 4px;
}

.service-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.service-actions {
    display: flex;
    gap: 8px;
}

/* Domain List */
.domain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
}

.domain-info h4 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.domain-meta {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.domain-meta i {
    margin-right: 4px;
}

.domain-meta .ssl-enabled {
    color: var(--success);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 16px;
    }
}
