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

:root {
    --primary-color: #0056b3;
    --primary-dark: #003d80;
    --secondary-color: #00a896;
    --bg-gradient-1: #f0f4f8;
    --bg-gradient-2: #d9e2ec;
    --text-main: #102a43;
    --text-muted: #627d98;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 20px 40px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header area updated to seamlessly integrate logo stripes */
.main-header {
    background: linear-gradient(to bottom, 
        rgb(140, 171, 157) 0px, rgb(140, 171, 157) 19px,
        #ffffff 19px, #ffffff 20px,
        rgb(134, 129, 147) 20px, rgb(134, 129, 147) 21px,
        rgb(205, 204, 211) 21px, rgb(205, 204, 211) 60px,
        rgb(130, 125, 144) 60px, rgb(130, 125, 144) 61px,
        #ffffff 61px
    );
    height: 104px;
    padding: 0 2rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e2e8f0;
}

.logo, .logo a {
    display: block;
    height: 104px;
}

.logo img {
    height: 104px;
    width: auto;
    display: block;
}

.nav-info, .header-controls {
    font-weight: bold;
    color: var(--text-main);
    /* Visual lift slightly more than math midpoint to offset font baseline and fit comfortably in the stripe */
    transform: translateY(-17px); 
    display: flex;
    align-items: center;
}

/* Ensure header logout button is slightly tighter to float freely in the gray stripe without touching borders */
.header-controls .btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1;
}

/* Card & Containers */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-strong);
    padding: 2.5rem;
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Forms */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
}

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

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255,255,255,0.7);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
    background: #fff;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Alert Message */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 4px solid;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #ef4444;
}

/* Dashboard Elements */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.data-item {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    border-bottom: 3px solid var(--secondary-color);
}

.data-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-val {
    font-size: 1.1rem;
    font-weight: 700;
}

/* News area */
.news-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Tables */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
}

.modern-table th {
    background: #f1f5f9;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.modern-table tr:hover td {
    background: #f8fafc;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
