:root {
    --primary-color: #007bff;
    --secondary-color: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --danger-color: #dc3545;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: var(--secondary-color);
    color: var(--text-color);
}

#toast-container {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1100;
    pointer-events: none;
}

.toast-notification {
    min-width: 220px;
    max-width: 320px;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #fff;
    background-color: rgba(33, 37, 41, 0.92);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification.toast-success {
    background-color: var(--primary-color);
}

.toast-notification.toast-error {
    background-color: var(--danger-color);
}

.toast-notification.toast-info {
    background-color: #495057;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1100;
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 420px;
    width: calc(100% - 2rem);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    border-top: 4px solid var(--border-color);
}

.modal-dialog.modal-success {
    border-top-color: var(--primary-color);
}

.modal-dialog.modal-error {
    border-top-color: var(--danger-color);
}

.modal-dialog.modal-info {
    border-top-color: #495057;
}

.modal-dialog h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.modal-dialog p {
    margin: 0;
    line-height: 1.5;
}

.modal-dialog .modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-dialog .modal-actions button {
    min-width: 96px;
}

.modal-dialog .modal-actions .secondary {
    background: #adb5bd;
    color: #fff;
}

.modal-dialog .modal-actions .primary {
    background: var(--primary-color);
    color: #fff;
}

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

#auth-container {
    width: 100%;
}

.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#main-dashboard {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.dashboard-body {
    display: flex;
    flex-grow: 1;
}

#sidebar {
    width: 250px;
    background-color: #fff;
    padding: 1rem;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

#sidebar h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar ul li {
    margin-bottom: 0.25rem;
}

#sidebar ul li a {
    display: block;
    padding: 0.75rem;
    text-decoration: none;
    color: var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.2s;
}

#sidebar ul li a:hover {
    background-color: var(--secondary-color);
}

#sidebar .has-submenu>.submenu-toggle {
    position: relative;
    font-weight: 500;
}

#sidebar .has-submenu>.submenu-toggle::after {
    content: '▼';
    position: absolute;
    right: 0.75rem;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

#sidebar .has-submenu.active>.submenu-toggle::after {
    transform: rotate(-180deg);
}

#sidebar .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0;
}

#sidebar .has-submenu.active>.submenu {
    max-height: 500px;
}

#sidebar .submenu li {
    margin-bottom: 0;
}

#sidebar .submenu li a {
    padding: 0.5rem 0.75rem 0.5rem 1.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

#sidebar .submenu li a:hover {
    color: var(--primary-color);
    background-color: var(--secondary-color);
}

#app-content {
    flex-grow: 1;
    padding: 0;
    overflow-y: auto;
}

.breadcrumb {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: #6c757d;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: '>';
    padding: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

.content-wrapper {
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 0;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.stat-label {
    font-size: 0.95rem;
    color: #6c757d;
}

.stat-value {
    margin-top: 0.25rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}

.hrm-modal {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -20%);
    width: 420px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.hrm-modal--md {
    width: 460px;
    max-width: 92vw;
}

.hrm-modal__header {
    cursor: move;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.hrm-modal__header.is-primary {
    background: #0d6efd;
}

.hrm-modal__header.is-secondary {
    background: #6c757d;
}

.hrm-modal__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.hrm-modal__body {
    padding: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

button {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
}

button.danger {
    background-color: var(--danger-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: var(--secondary-color);
}

@media (max-width: 768px) {
    .dashboard-body {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}