/* public/css/style.css */

/* Settings Layout Wrapper */
.settings-layout {
    display: flex !important;
    flex-direction: row !important;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
    width: 100%;
}

.settings-sidebar {
    width: 260px;
    min-width: 260px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.settings-content {
    flex: 1 1 auto;
    min-width: 0;
}


* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: #f7fafc; margin: 0; padding: 0; color: #2d3748; display: flex; flex-direction: column; min-height: 100vh; }

.navbar { background: #2b6cb0; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.navbar .nav-brand { font-size: 1.25rem; font-weight: 700; }
.navbar .user-info { font-size: 0.9rem; }
.navbar a.btn-logout { color: #e2e8f0; text-decoration: none; margin-left: 1rem; font-weight: 600; padding: 0.3rem 0.6rem; border: 1px solid rgba(255,255,255,0.4); border-radius: 4px; }
.navbar a.btn-logout:hover { background: rgba(255,255,255,0.1); color: white; }

.main-content { flex: 1; }

.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
.welcome-header { margin-bottom: 2rem; }

.auth-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; padding: 1rem; }
.auth-card { background: #ffffff; padding: 2.5rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); width: 100%; max-width: 440px; }
.auth-card h2 { margin-top: 0; margin-bottom: 0.5rem; color: #1a202c; text-align: center; }
.auth-card p.subtitle { color: #718096; text-align: center; margin-bottom: 1.5rem; font-size: 0.9rem; }

.form-row { display: flex; gap: 1rem; }
.form-group { margin-bottom: 1.25rem; flex: 1; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.85rem; color: #4a5568; }
.form-group input { width: 100%; padding: 0.75rem; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.95rem; }
.form-group input:focus { outline: none; border-color: #3182ce; box-shadow: 0 0 0 3px rgba(49,130,206,0.15); }

.btn-submit { width: 100%; padding: 0.75rem; background: #3182ce; color: white; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-submit:hover { background: #2b6cb0; }

.alert-danger { background: #fed7d7; color: #9b2c2c; padding: 0.75rem; border-radius: 6px; font-size: 0.875rem; margin-bottom: 1rem; border: 1px solid #feb2b2; }
.alert-success { background: #c6f6d5; color: #22543d; padding: 0.75rem; border-radius: 6px; font-size: 0.875rem; margin-bottom: 1rem; border: 1px solid #9ae6b4; }

.badge { background: #e2e8f0; color: #4a5568; padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; margin-right: 0.25rem; text-transform: uppercase; }
.badge-admin { background: #fed7d7; color: #9b2c2c; }
.badge-manager { background: #feebc8; color: #9c4221; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.card { background: white; border-radius: 8px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.card h3 { margin-top: 0; font-size: 1.1rem; border-bottom: 2px solid #edf2f7; padding-bottom: 0.5rem; color: #2b6cb0; }

.info-row { display: flex; justify-content: space-between; margin-bottom: 0.75rem; font-size: 0.95rem; }
.info-row .label { color: #718096; font-weight: 500; }

.table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.9rem; }
.table th, .table td { padding: 0.6rem; text-align: left; border-bottom: 1px solid #edf2f7; }
.table th { background-color: #f7fafc; color: #4a5568; }

.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: #718096; }
.auth-footer a { color: #3182ce; text-decoration: none; font-weight: 600; }

.footer { text-align: center; padding: 1.5rem; font-size: 0.85rem; color: #a0aec0; background: #edf2f7; margin-top: auto; }

/* Additions to public/css/style.css */

.navbar .nav-menu { display: flex; gap: 1rem; align-items: center; }
.navbar .nav-link { color: #e2e8f0; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.navbar .nav-link:hover { color: #ffffff; }

.directory-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.directory-header .subtitle { color: #718096; margin: 0.25rem 0 0 0; font-size: 0.9rem; }

.filter-card { margin-bottom: 1.5rem; }
.filter-form { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.filter-form .form-group { margin-bottom: 0; min-width: 200px; }
.filter-form select { width: 100%; padding: 0.75rem; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 0.95rem; background: white; }

.filter-actions { display: flex; gap: 0.5rem; }
.btn-reset { padding: 0.75rem 1rem; background: #e2e8f0; color: #4a5568; text-decoration: none; border-radius: 6px; font-size: 0.9rem; font-weight: 600; text-align: center; }
.btn-reset:hover { background: #cbd5e0; }

.table-responsive { overflow-x: auto; }
.table-hover tbody tr:hover { background-color: #f7fafc; }
.text-muted { color: #718096; }

/* Status Badges */
.badge-active { background: #c6f6d5; color: #22543d; }
.badge-leave { background: #feebc8; color: #9c4221; }
.badge-terminated { background: #fed7d7; color: #9b2c2c; }


/* Additions for Edit Actions & Form Select Inputs */
.btn-edit {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #3182ce;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-edit:hover {
    background-color: #2b6cb0;
}

.card form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
}


/* Additions for Administration Dropdown Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem;
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: #ffffff;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu a {
    color: #2d3748;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background-color: #edf2f7;
    color: #2b6cb0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* Styling for Table Action Buttons Row */
.action-buttons {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.action-buttons form {
    margin: 0;
}

.btn-delete {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete:hover {
    background-color: #c53030;
}

/* Dashboard Asymmetric Layout */
.dashboard-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.card-header-flex h3 {
    border-bottom: none;
    margin: 0;
    padding-bottom: 0;
}

/* Shift Row Highlights */
.highlight-today {
    background-color: #ebf8ff !important;
}

.badge-shift {
    background-color: #e2e8f0;
    color: #2b6cb0;
    font-weight: 600;
}

/* Multi-Role Option Cards Fix */
.role-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.role-option-card {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    background: #ffffff;
    display: flex;
    align-items: center; /* Vertically center checkbox with text */
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    user-select: none;
}

.role-option-card:hover {
    background: #edf2f7;
    border-color: #cbd5e1;
}

/* Ensure checkbox alignment reset */
.role-option-card input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0; /* Prevents checkbox from shrinking when label is long */
}

.role-option-card strong {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.2;
}

/* Submenu Hover Styling */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu-title {
    display: block;
    padding: 0.5rem 1rem;
    color: #2d3748;
    font-weight: 600;
    cursor: pointer;
}

.dropdown-submenu-title:hover {
    background-color: #edf2f7;
}

.dropdown-submenu-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    min-width: 180px;
    z-index: 1000;
}

.dropdown-submenu:hover .dropdown-submenu-menu {
    display: block;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 0.25rem 0;
}


/* Multi-Level Dropdown & Submenu Navigation */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem;
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: #ffffff;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 1000;
    padding: 0.25rem 0;
}

.dropdown:hover > .dropdown-menu {
    display: block;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 0.25rem 0;
}

/* Submenu Styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #2d3748;
    padding: 0.6rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.dropdown-submenu:hover > .dropdown-submenu-title {
    background-color: #edf2f7;
    color: #2b6cb0;
}

.dropdown-submenu-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #ffffff;
    min-width: 190px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 1001;
    padding: 0.25rem 0;
}

.dropdown-submenu:hover > .dropdown-submenu-menu {
    display: block;
}

.dropdown-submenu-menu a {
    color: #4a5568;
    padding: 0.55rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
}

.dropdown-submenu-menu a:hover {
    background-color: #ebf8ff;
    color: #2b6cb0;
}

.settings-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 1rem;
}

.settings-content {
    flex-grow: 1;
    min-width: 0; /* Prevents flex children from overflowing */
}
