/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #ff7b1d;
    /* OrangeHRMish Orange */
    --primary-hover: #e06000;
    --text-color: #333;
    --bg-color: #f4f5f7;
    --white: #ffffff;
    --gray-100: #f3f4f6;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Login Page Styles */
.login-container {
    display: flex;
    width: 100%;
    height: 100vh;
    background: var(--white);
    overflow: hidden;
}

.login-left {
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    position: relative;
    z-index: 2;
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-600);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-600);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 123, 29, 0.1);
}

.btn-primary {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Right Side - Branding & Graphics */
.login-right {
    width: 60%;
    background: linear-gradient(135deg, #ff7b1d 0%, #ff5200 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-direction: column;
    text-align: center;
}

/* Curved Divider */
.custom-shape-divider-left-100 {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    height: 100%;
    overflow: hidden;
    line-height: 0;
}

.custom-shape-divider-left-100 svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100%;
}

.custom-shape-divider-left-100 .shape-fill {
    fill: #FFFFFF;
}

/* Branding Content */
.brand-content {
    z-index: 2;
    padding: 2rem;
    max-width: 500px;
}

.brand-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.brand-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        width: 100%;
        height: 100%;
        padding: 2rem;
        justify-content: center;
    }

    .login-right {
        display: none;
        /* Hide branding on mobile for simple split */
    }
}

/* --- Dashboard Styles --- */
.dashboard-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-color);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #1e293b;
    /* Dark Slate */
    color: var(--white);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: all 0.3s;
    z-index: 10;
}

.sidebar.active {
    left: -250px;
}

.sidebar-brand {
    padding: 1.5rem;
    text-align: center;
    background-color: #0f172a;
    border-bottom: 1px solid #334155;
}

.sidebar-brand h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    padding: 0;
}

.sidebar-menu li.menu-header {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.sidebar-menu li a i {
    width: 25px;
    margin-right: 10px;
    text-align: center;
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: all 0.3s;
    min-width: 0;
    /* Critical for responsiveness in nested flex */
}

.main-content.active {
    margin-left: 0;
}

/* Topbar */
.topbar {
    background-color: var(--white);
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.toggle-btn {
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-600);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-details {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.user-avatar i {
    font-size: 2rem;
    color: var(--gray-300);
}

.logout-btn {
    color: var(--gray-600);
    font-size: 1.2rem;
    margin-left: 1rem;
    transition: color 0.3s;
}

.logout-btn:hover {
    color: #ef4444;
    /* Red for logout */
}

/* Content Area */
.content-wrapper {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    min-width: 0;
    /* Critical for responsiveness */
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    color: #1f2937;
}

/* Footer */
.footer {
    background-color: var(--white);
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-600);
    border-top: 1px solid #e5e7eb;
}

/* Responsive Dashboard */
@media (max-width: 992px) {
    .sidebar {
        left: -250px;
        /* Hidden by default on mobile */
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }
}

/* Card Component */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* Soft premium shadow */
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    background: #ffffff;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}