:root {
    --primary-gradient: linear-gradient(135deg, #0061f2 0%, #6900f2 100%); /* Modern Blue-Purple */
    --sidebar-gradient: linear-gradient(180deg, #0061f2 0%, #6900f2 100%);
    --bg-gradient: linear-gradient(135deg, #eef2f6 0%, #ffffff 100%);
    --primary-color: #0061f2;
    --secondary-color: #6900f2;
    --text-color: #333;
    --text-light: #666;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.08);
    --radius-md: 10px;
    --radius-lg: 15px;
}

/* User requested Blue-White Gradient specifically */
:root {
    --primary-gradient: linear-gradient(135deg, #005bea 0%, #00c6fb 100%); /* Malibu Beach Blue */
    --sidebar-gradient: linear-gradient(135deg, #005bea 0%, #00c6fb 100%);
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%); /* Softer Blue to White */
    --primary-color: #007bff;
    --secondary-color: #00c6fb;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page Specifics */
body.login-page {
    background: var(--primary-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: transform 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-gradient);
    color: var(--white);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
    transition: width 0.3s ease;
    position: fixed;
    height: 100%;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.9);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-left-color: var(--white);
    padding-left: 30px;
}

.sidebar-menu i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 25px;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px; /* Match sidebar width */
    padding: 30px;
    transition: margin-left 0.3s ease;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.top-bar h1 {
    font-size: 1.5rem;
    color: var(--text-color);
}

.user-info {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-weight: 500;
}

.user-info i {
    margin-right: 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card {
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0,91,234,0.1) 0%, rgba(0,198,251,0.1) 100%);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
}

.stat-info h3 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tables */
.table-container {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 15px;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: rgba(0,91,234,0.02);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,91,234,0.3);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.btn-secondary {
    background: #6c757d;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
    background-color: #fff;
    background-clip: padding-box;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #4a5568;
    background-color: #fff;
    border-color: #3182ce;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25);
}

.form-control::placeholder {
    color: #a0aec0;
    opacity: 1;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a0aec0'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Checkbox & Radio */
.custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
    cursor: pointer;
    padding-left: 2rem;
}

.custom-control-label::before {
    position: absolute;
    top: 0.1rem;
    left: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-control-label::after {
    position: absolute;
    top: 0.1rem;
    left: 0;
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

/* Grid System for Forms */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.form-col {
    flex: 1;
    padding-right: 10px;
    padding-left: 10px;
    min-width: 200px; /* Responsive behavior */
}

/* Helper Text */
.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85em;
    color: #718096;
}

/* DNS Fields Container */
.dns-fields-container {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

/* Legacy Support (Clean up later if needed) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    /* Use .form-control styles where possible, but keep this as fallback/base */
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px; /* Updated radius */
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fcfcfc;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 97, 242, 0.15);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,91,234,0.1);
    outline: none;
    background: var(--white);
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: rgba(56, 239, 125, 0.1);
    color: #155724;
    border-left-color: #38ef7d;
}

.alert-danger {
    background-color: rgba(255, 75, 43, 0.1);
    color: #721c24;
    border-left-color: #ff4b2b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar:hover {
        width: 260px;
    }
    
    .sidebar-header h2, 
    .sidebar-menu span,
    .sidebar-footer {
        display: none; /* Hide text on mobile by default */
    }
    
    .sidebar:hover .sidebar-header h2,
    .sidebar:hover .sidebar-menu span,
    .sidebar:hover .sidebar-footer {
        display: block;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 15px;
    }
    
    .top-bar {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Card Styles */
.stat-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    border: none;
    background: #fff;
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(50,50,93,.1), 0 5px 15px rgba(0,0,0,.07);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-info {
    flex-grow: 1;
}

.stat-info h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #32325d;
}

.stat-info p {
    color: #8898aa;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-arrow {
    font-size: 1.2rem;
    color: #dee2e6;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-arrow {
    transform: translateX(5px);
    opacity: 1;
    color: var(--primary-color);
}

/* Content Box & Quick Actions */
.content-box {
    background: var(--white);
    padding: 35px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    margin-top: 30px;
    border: none;
}

.content-box h3 {
    margin-bottom: 25px;
    color: #32325d;
    font-size: 1.25rem;
    border-bottom: 2px solid #f0f4f8;
    padding-bottom: 15px;
    font-weight: 600;
}

.quick-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    font-size: 1rem;
    border-radius: 50px; /* Pill shape */
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #005bea 0%, #00c6fb 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    border: none;
}

.btn-action i {
    margin-right: 10px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50,50,93,.1), 0 3px 6px rgba(0,0,0,.08);
    background: linear-gradient(135deg, #0048ba 0%, #00a5d9 100%); /* Slightly darker on hover */
}
