/* Global Variables */
:root {
    --primary-color: #35332A;      /* slate 800 */
    --secondary-color: #7ECBDA;    /* blue */
    --accent-color: #F39200;       /* orange */
    --warning-color: #eab308;      /* Amber */
    --danger-color: #ef4444;       /* Red */
    --text-color: #1e293b;         /* Slate 800 */
    --text-light: #64748b;         /* Slate 500 */
    --bg-color: #f1f5f9;           /* Slate 100 */
    --card-bg: #ffffff;
    --sidebar-bg: #1f2937;         /* Dark Gray/Anthracite */
    --sidebar-hover: #374151;      /* Slightly lighter gray for hover states */
    --sidebar-text: #f3f4f6;       /* Light text for sidebar */
    --border-color: #e2e8f0;       /* Slate 200 */
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease;
}

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Common Elements */
h2 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h3 {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

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

a:hover {
    text-decoration: underline;
}

.btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-primary {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: black;
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
}

.btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

/* Card Styling */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

/* Form Elements */
input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    transition: var(--transition);
    outline: none;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

input::placeholder {
    color: #999;
}

button {
    padding: 0.9rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Login Page Specific */
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 2rem auto;
}

.centered-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.brand-header {
    margin-bottom: 2rem;
    text-align: center;
}

.brand-logo {
    display: inline-block;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    background-image: url(/static/img/icon.png);
    background-size: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

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

.help-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

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

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

/* Dashboard Brand/Navigation */
.brand {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.brand-name {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: rgba(243, 244, 246, 0.8);  /* Slightly dimmed sidebar-text */
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.nav-icon {
    margin-right: 0.8rem;
    width: 20px;
    height: 20px;
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Dashboard Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.user-welcome h2 {
    color: var(--text-color);
    font-weight: 600;
}

.user-welcome p {
    color: var(--text-light);
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    margin-right: 0.8rem;
}

.user-name {
    font-weight: 500;
}

/* Dashboard Content */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.resource-list {
    list-style: none;
}

.resource-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.resource-name {
    font-weight: 500;
}

.resource-value {
    text-align: right;
}

.resource-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-footer {
    margin-top: 1rem;
    text-align: center;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-all:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
        position: fixed;
        z-index: 999;
        transition: var(--transition);
    }

    .sidebar.active {
        width: 250px;
        padding: 2rem 1rem;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}