* {
    box-sizing: border-box;
}

:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --primary-color: #00d2ff;
    --secondary-color: #3a7bd5;
    --error-color: #ff4d4d;
    --success-color: #00c851;
}


body {
    background: var(--bg-color);
    background: linear-gradient(135deg, #1f4037, #99f2c8);
    /* Fallback / nice gradient */
    background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
    /* Deep dark theme */
    color: var(--text-color);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: 0.3s;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    grid-gap: 20px;
    margin-bottom: 25px;
    width: 100%;
}

.widget-card {
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
    min-height: 180px;
    min-width: 0;
    /* CRITICAL for grid children with long content */
    overflow: hidden;
}


.widget-card h4 {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    font-size: 0.8rem;
    color: #aaa;
}


/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
}

.btn-block {
    width: 100%;
}

/* Navbar */
.navbar {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.nav-links a {
    margin-left: 20px;
    color: #ccc;
}

.nav-links a:hover {
    color: #fff;
}

/* Alerts */
.alert {
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(255, 77, 77, 0.2);
    border: 1px solid var(--error-color);
    color: #ffcccc;
}

.alert-success {
    background: rgba(0, 200, 81, 0.2);
    border: 1px solid var(--success-color);
    color: #ccffcc;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .glass-card {
        padding: 1.5rem;
    }
}