@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Basic Professional Color Palette (Flat, Light) */
    --primary: #0f62fe;       /* IBM Blue / Enterprise Blue */
    --primary-hover: #0353e9;
    
    --bg-main: #f4f4f4;       /* Light gray background */
    --bg-surface: #ffffff;    /* White cards */
    
    --border-color: #e0e0e0;  /* Standard border */
    
    --text-primary: #161616;  /* Almost black */
    --text-secondary: #525252;/* Dark gray */
    --text-muted: #8d8d8d;    /* Mid gray */
    
    --success: #198038;
    --success-bg: #defbe6;
    --danger: #da1e28;
    --danger-bg: #fff1f1;
    --warning: #f1c21b;
    --warning-bg: #fcf4d6;
    
    --nav-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-main: #0d1117;       /* Dark background (GitHub style) */
    --bg-surface: #161b22;    /* Slightly lighter for cards */
    
    --border-color: #30363d;  /* Dark borders */
    
    --text-primary: #c9d1d9;  /* Off-white text */
    --text-secondary: #8b949e;/* Muted text */
    --text-muted: #6e7681;
    
    --nav-bg: #161b22;
    
    /* Adjust semantic colors for dark mode visibility */
    --success: #3fb950;
    --success-bg: rgba(63, 185, 80, 0.1);
    --danger: #f85149;
    --danger-bg: rgba(248, 81, 73, 0.1);
    --warning: #d29922;
    --warning-bg: rgba(210, 153, 34, 0.1);
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none !important; }
[data-theme="dark"] .theme-icon-sun { display: block !important; }

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- NAVIGATION --- */
nav {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    height: 70px;
}

nav .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn) {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 4px; /* Basic square radius */
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary, .btn-accent {
    background: var(--primary);
    color: #fff;
}

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

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

.btn-outline:hover {
    border-color: var(--text-secondary);
    background: #f9f9f9;
}

/* --- HERO SECTION --- */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- CARDS & GRID --- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-card .icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: #f4f4f4;
    border-radius: 4px;
    color: var(--primary);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-card .price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.service-card .price span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* --- DASHBOARD & ADMIN --- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Admin wrapper logic */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.admin-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-item:hover {
    background: #f4f4f4;
    color: var(--text-primary);
}

.admin-sidebar .nav-item.active {
    background: #e5f0ff;
    color: var(--primary);
    font-weight: 600;
}

/* --- TABLES --- */
.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f9f9f9;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

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

/* --- BADGES --- */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    text-transform: uppercase;
}

.badge-active { background: var(--success-bg); color: var(--success); border: 1px solid var(--success); }
.badge-suspended { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }
.badge-pending { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning); }

/* --- FORMS --- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

input, select, textarea {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- ALERTS --- */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.alert-success { background: var(--success-bg); border: 1px solid var(--success); color: var(--success); }
.alert-danger { background: var(--danger-bg); border: 1px solid var(--danger); color: var(--danger); }

/* --- FOOTER --- */
footer {
    padding: 3rem 0;
    text-align: center;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

footer .logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

footer .legal-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

footer .legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
}

footer .legal-links a:hover {
    color: var(--primary);
}

footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- UTILS --- */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* --- INDEX SPECIFIC --- */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}
.trust-badges span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.features-section {
    padding: 5rem 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}
.feature-item {
    text-align: left;
}
.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); }
    .hero h1 { font-size: 2rem; }
}
