/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* Authentication Container (Center Screen) */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px; /* Mobile Friendly width */
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-control:focus {
    border-color: #27ae60;
    outline: none;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #219150;
}

/* Links */
.auth-links {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: #27ae60;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Messages */
.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 0.9rem;
}
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
/* --- DASHBOARD LAYOUT --- */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    transition: all 0.3s;
    position: fixed;
    height: 100%;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background-color: #1a252f;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    border-bottom: 1px solid #34495e;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #bdc3c7;
    text-decoration: none;
    border-bottom: 1px solid #34495e;
    transition: background 0.3s;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: #27ae60;
    color: white;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 250px; /* Same as sidebar width */
    background-color: #ecf0f1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info span {
    margin-right: 15px;
    font-weight: 600;
}

.btn-logout {
    color: #e74c3c;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid #e74c3c;
    padding: 5px 15px;
    border-radius: 4px;
    transition: 0.3s;
}

.btn-logout:hover {
    background: #e74c3c;
    color: white;
}

/* Page Content */
.content-wrapper {
    padding: 30px;
}

/* Responsive Mobile */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px; /* Hide sidebar */
        z-index: 1000;
    }
    .sidebar.active {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .mobile-toggle {
        display: block;
        margin-right: 15px;
    }
}