html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login & Register */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 28px;
}

.login-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

/* Password wrapper with toggle button */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: rgba(102, 126, 234, 0.2);
    color: #764ba2;
    outline: none;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.register-link {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #c33;
    animation: slideIn 0.3s ease-out;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #3c3;
    animation: slideIn 0.3s ease-out;
}

/* Dashboard */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f5f5f5;
}

.navbar {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-role {
    color: #666;
    font-size: 14px;
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 5px;
}

.btn-logout {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: #c0392b;
}

.dashboard-container {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 250px;
    background: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.sidebar-header {
    padding: 15px 20px;
    font-weight: 700;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.sidebar-menu a:hover {
    background: #f5f5f5;
    color: #667eea;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

#content-area {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 400px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.feature-list li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    color: #666;
}

.feature-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
    }

    .sidebar-menu {
        display: flex;
        width: 100%;
    }

    .sidebar-menu li {
        flex: 1;
    }

    .sidebar-menu a {
        text-align: center;
    }

    .login-box {
        padding: 30px 20px;
    }

    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .main-content {
        padding: 15px;
    }

    #content-area {
        padding: 15px;
    }
}
