/* Enterprise Management System - Main CSS */

/* Variables and custom properties */
:root {
    --primary-color: #00205B;
    --secondary-color: #FFCC00;
    --background-color: #FFFFFF;
    --sidebar-color: #F5F5F5;
    --text-color: #333333;
    --text-light-color: #FFFFFF;
    --border-color: #E0E0E0;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* Global styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header styles */
.header {
    background-color: var(--primary-color);
    color: var(--text-light-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-brand {
    display: flex;
    align-items: center;
    color: var(--text-light-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.25rem;
}

.header-brand img {
    height: 40px;
    margin-right: 0.75rem;
}

.header-nav {
    display: flex;
    align-items: center;
}

.header-nav-item {
    margin-left: 1rem;
    position: relative;
}

.header-nav-link {
    color: var(--text-light-color);
    text-decoration: none;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.header-nav-link:hover {
    color: var(--secondary-color);
}

.header-nav-link .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 0.65rem;
}

/* Dropdown styles */
.dropdown-menu {
    padding: 0.5rem 0;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    border-radius: 0.375rem;
    min-width: 15rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(0, 32, 91, 0.05);
}

.dropdown-item.active, .dropdown-item:active {
    background-color: var(--primary-color);
    color: var(--text-light-color);
}

.dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0.25rem 0;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

/* Main content area */
.main-content {
    display: flex;
    flex: 1;
}

/* Sidebar styles */
.sidebar {
    width: 290px;
    background-color: var(--sidebar-color);
    border-right: 1px solid var(--border-color);
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav-item {
    margin-bottom: 0.25rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-nav-link:hover, 
.sidebar-nav-link.active {
    background-color: rgba(0, 32, 91, 0.1);
    color: var(--primary-color);
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary-color);
}

.sidebar-nav-link.active {
    background-color: rgba(0, 32, 91, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.sidebar-nav-link.active i {
    color: var(--primary-color);
}

.sidebar-nav-link i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 1.5rem;
    text-align: center;
}

.sidebar-nav-text {
    flex: 1;
}

.sidebar-nav-arrow {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.sidebar-nav-link[aria-expanded="true"] .sidebar-nav-arrow {
    transform: rotate(90deg);
}

.sidebar-nav-link .bi-chevron-right {
    transition: transform 0.2s ease;
}

.sidebar-nav-link[aria-expanded="true"] .bi-chevron-right {
    transform: rotate(90deg);
}

.sidebar-submenu {
    padding-left: 3.25rem;
}

.sidebar-submenu-item {
    margin-bottom: 0.25rem;
}

.sidebar-submenu-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-submenu-link:hover,
.sidebar-submenu-link.active {
    color: var(--primary-color);
    font-weight: 500;
}

.sidebar-submenu-link {
    position: relative;
}

.sidebar-submenu-link.active::before {
    content: '•';
    position: absolute;
    left: -0.75rem;
    color: var(--primary-color);
}

/* Content wrapper */
.content-wrapper {
    flex: 1;
    padding: 1.5rem;
    overflow-x: hidden;
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Footer styles */
.footer {
    background-color: var(--primary-color);
    color: var(--text-light-color);
    padding: 1rem 1.5rem;
    margin-top: auto;
}

/* Card styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0;
}

.card-body {
    padding: 1.25rem;
}

/* Table styles */
.table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.02);
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.empty-state-text {
    color: #888;
    margin-bottom: 1rem;
}

/* Avatar styles */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Login page styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 0;
    background-color: var(--background-color);
    border-radius: 0.75rem;
    box-shadow: 0 6px 24px rgba(0, 32, 91, 0.10), 0 1.5px 4px rgba(0,0,0,0.04);
    overflow: hidden;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    max-height: 90px;
    margin-bottom: 1rem;
}

.login-logo h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

.login-card .card-header {
    background: linear-gradient(90deg, var(--primary-color) 80%, #ffe066 100%);
    color: var(--text-light-color);
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: none;
    padding: 1.25rem 1.25rem 1rem 1.25rem;
    letter-spacing: 0.5px;
}

.login-card .card-body {
    padding: 1.5rem 1.25rem 1.25rem 1.25rem;
    background: transparent;
}

.login-card .card-footer {
    background: none;
    border-top: none;
    padding: 1rem 1.25rem 1.25rem 1.25rem;
}

.login-card .form-label {
    font-weight: 500;
    color: var(--primary-color);
}

.login-card .input-group-text {
    background: #f1f3f6;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.login-card .form-control {
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,32,91,0.10);
}

.login-card .btn-primary {
    background: linear-gradient(90deg, var(--primary-color) 80%, #ffe066 100%);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,32,91,0.08);
}

.login-card .btn-primary:hover, .login-card .btn-primary:focus {
    background: linear-gradient(90deg, #00153a 80%, #ffe066 100%);
    box-shadow: 0 4px 16px rgba(0,32,91,0.12);
}

.login-card .form-check-label {
    color: var(--primary-color);
    font-weight: 400;
}

.login-card .alert {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}

.login-card .forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.login-card .forgot-link:hover, .login-card .forgot-link:focus {
    color: var(--secondary-color);
    text-decoration: underline;
}

.login-card .form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0,32,91,0.10);
}

/* Responsive styles */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-nav-text, 
    .sidebar-nav-arrow {
        display: none;
    }
    
    .sidebar-submenu {
        position: absolute;
        left: 70px;
        top: 0;
        width: 200px;
        background-color: var(--sidebar-color);
        border: 1px solid var(--border-color);
        border-radius: 0 0.25rem 0.25rem 0;
        padding: 0.5rem;
        z-index: 1000;
    }
    
    .content-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
    
    .sidebar {
        width: 0;
        position: fixed;
        z-index: 1001;
        height: 100vh;
        top: 60px;
    }
    
    .sidebar.active {
        width: 250px;
    }
    
    .sidebar.active .sidebar-nav-text, 
    .sidebar.active .sidebar-nav-arrow {
        display: block;
    }
    
    .content-wrapper {
        margin-left: 0;
    }
    
    .header-brand span {
        display: none;
    }
}

/* Reduce font size in main page content */
/*
.content-wrapper,
.content-wrapper .card-body {
    font-size: 0.875rem;
}
*/
.content-wrapper,
.content-wrapper .card-body {
    font-size: 0.825rem;
}

/* Reduce font size for form controls in main page content */
.content-wrapper input,
.content-wrapper select,
.content-wrapper textarea,
.content-wrapper button {
    font-size: 0.825rem;
}

/* Action buttons styling */
.btn-group .btn {
    white-space: nowrap;
    min-width: auto;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.table .btn-group {
    display: flex;
    gap: 2px;
}

.table .btn-group .btn {
    margin: 0;
    border-radius: 0.25rem;
}

.table .btn-group .btn:not(:last-child) {
    margin-right: 2px;
}

/* Ensure action buttons are visible */
.table td .btn-group {
    visibility: visible;
    opacity: 1;
}
