/* =============================================
   EMPLOYEE PORTAL STYLES
   Extends the main style.css design system
   ============================================= */

/* ---- Portal Shell Layout ---- */
.portal-shell {
    display: flex;
    height: 100%; /* Fill the space within the padded body */
}

.portal-main {
    flex-grow: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    overflow-y: auto; /* Allow main content to scroll */
}

/* ---- Desktop Sidebar ---- */
.portal-sidebar {
    position: fixed;
    top: 102px;
    left: 0;
    bottom: 3.5rem; /* Adjust for footer */
    width: 220px;
    background: rgba(30, 33, 41, 0.95);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 1.25rem 0;
}

.sidebar-profile {
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.sidebar-profile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.sidebar-profile h2 {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
}

.sidebar-nav .portal-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    text-align: left;
    white-space: nowrap;
}

.sidebar-nav .portal-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .portal-tab.active {
    background: rgba(255, 105, 180, 0.1);
    color: var(--accent-color);
    font-weight: 600;
}

.sidebar-nav .portal-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 55%;
    background: var(--accent-color);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav .portal-tab i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
}

.sidebar-nav .tab-badge {
    margin-left: auto;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .logout-btn {
    width: 100%;
    justify-content: center;
}

/* ---- Desktop Sidebar ---- */

/* ---- Mobile Top Bar ---- */
.mobile-top-bar {
    display: none;
}

.mobile-welcome-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-bell {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.mobile-bell:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

/* ---- Mobile Bottom Nav ---- */
/* Override inherited <nav> element styles from style.css */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    top: auto;
    bottom: 0;
    border-bottom: none;
    box-shadow: none;
    padding: 0;
}

.mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.35rem 0;
    background: none;
    border: none;
    color: var(--text-light);
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    min-width: 48px;
}

.mobile-tab i {
    font-size: 1.1rem;
}

.mobile-tab-label {
    font-size: 0.6rem;
    font-weight: 500;
}

.mobile-tab.active {
    color: var(--accent-color);
}

.mobile-tab.active .mobile-tab-label {
    font-weight: 600;
}

#mobile-msg-badge {
    position: absolute;
    top: -2px;
    right: 4px;
    font-size: 0.5rem;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    background: #dc3545;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 3px;
}

/* ---- Login Page ---- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem;
}

.login-card {
    background: var(--card-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: var(--card-border);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--card-shadow);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.8rem;
}

.login-card .login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.login-card .form-group {
    margin-bottom: 1.5rem;
}

.login-card label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-card input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.login-card input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.login-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background: var(--accent-hover);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-error {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.login-error.visible {
    display: block;
}

.login-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.login-success.visible {
    display: block;
}

.forgot-password-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.forgot-password-link a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.forgot-password-link a:hover {
    opacity: 0.8;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-group-inline label {
    margin-bottom: 0; /* Override default margin */
    order: 2;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.form-group-inline input[type="checkbox"] {
    order: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.form-group-inline input[type="checkbox"]:hover {
    border-color: rgba(255, 105, 180, 0.5);
}

.form-group-inline input[type="checkbox"]:checked {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.form-group-inline input[type="checkbox"]:checked::after {
    content: '\f00c'; /* Font Awesome check icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 12px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.reset-form-container {
    display: none;
}

.reset-title {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

/* ---- Role Badge ---- */
.role-badge {
    background: var(--accent-color);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.role-badge.employee {
    background: rgba(255, 255, 255, 0.15);
}

/* ---- Logout Button ---- */
.logout-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: var(--text-primary);
}

/* ---- Tab Content ---- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    animation: fadeIn 0.3s ease;
}

/* ---- Glass Card (simplified) ---- */
.portal-card {
    background: rgba(40, 44, 52, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.25rem;
    overflow: hidden;
    box-sizing: border-box;
}

.portal-card h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-card h3 i {
    color: var(--accent-color);
}

/* ---- Schedule Grid ---- */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.schedule-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.schedule-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 0.4rem 0.85rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: var(--accent-color);
    color: #fff;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.week-nav button {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.week-nav button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.week-nav span {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.schedule-day {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    min-height: 120px;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.schedule-day.compact {
    min-height: 70px;
    padding: 0.5rem;
}

.schedule-day.today {
    border-color: var(--accent-color);
    background: rgba(255, 105, 180, 0.05);
}

.day-header {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.day-header .day-date {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    text-transform: none;
    margin-top: 0.15rem;
}

.compact .day-header {
    margin-bottom: 0.4rem;
    padding-bottom: 0.3rem;
    font-size: 0.7rem;
}

.compact .day-header .day-date {
    font-size: 0.9rem;
    margin-top: 0.1rem;
}

.shift-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0.6rem;
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid var(--accent-color);
    overflow: hidden;
}

.shift-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.shift-card .shift-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-card .shift-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-card .shift-location {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shift-card.compact {
    padding: 0.35rem 0.5rem;
    margin-bottom: 0.3rem;
}

.shift-card.compact .shift-name {
    font-size: 0.7rem;
}

.shift-card.compact .shift-time {
    font-size: 0.6rem;
}

.add-shift-btn {
    width: 100%;
    padding: 0.4rem;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.add-shift-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ---- Clock In/Out ---- */
.clock-status {
    text-align: center;
    padding: 2rem;
}

.clock-status .status-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.clock-status .status-icon.clocked-in {
    color: #28a745;
}

.clock-status .status-icon.clocked-out {
    color: var(--text-light);
}

.clock-status .status-text {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.clock-status .status-time {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.clock-btn {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.clock-btn.clock-in {
    background: #28a745;
    color: #fff;
}

.clock-btn.clock-in:hover {
    background: #218838;
}

.clock-btn.clock-out {
    background: #dc3545;
    color: #fff;
}

.clock-btn.clock-out:hover {
    background: #c82333;
}

.time-entries-list {
    margin-top: 1.5rem;
}

.time-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.time-entry .entry-times {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.time-entry .entry-duration {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.hours-stat {
    text-align: center;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.hours-stat .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.hours-stat .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ---- Time Off ---- */
.timeoff-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.timeoff-form .form-group {
    display: flex;
    flex-direction: column;
}

.timeoff-form .form-group.full-width {
    grid-column: 1 / -1;
}

.timeoff-form label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeoff-form input,
.timeoff-form textarea,
.timeoff-form select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.timeoff-form input:focus,
.timeoff-form textarea:focus,
.timeoff-form select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.timeoff-form textarea {
    resize: vertical;
    min-height: 80px;
}

.timeoff-form button {
    grid-column: 1 / -1;
    padding: 0.75rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.timeoff-form button:hover {
    background: var(--accent-hover);
}

.request-list {
    margin-top: 1.5rem;
}

.request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.request-info {
    flex: 1;
}

.request-dates {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.request-reason {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.request-employee {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.15rem;
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

.status-badge.approved {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.status-badge.denied {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* ---- Admin Section ---- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-form label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.admin-form input,
.admin-form select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.admin-form input:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.admin-form select option {
    background: #1e2129;
    color: var(--text-primary);
}

.admin-form button {
    padding: 0.75rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-form button:hover {
    background: var(--accent-hover);
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-actions button {
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-approve {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.btn-approve:hover {
    background: #28a745;
    color: #fff;
}

.btn-deny {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.btn-deny:hover {
    background: #dc3545;
    color: #fff;
}

.btn-edit {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.btn-edit:hover {
    background: #ffc107;
    color: #000;
}

.btn-delete {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

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

.employee-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.employee-list-item .emp-name {
    font-weight: 600;
    color: var(--text-primary);
}

.employee-list-item .emp-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.emp-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emp-edit-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emp-edit-btn:hover {
    background: rgba(255, 105, 180, 0.15);
    color: var(--accent-color);
    border-color: rgba(255, 105, 180, 0.3);
}

.emp-email-warning {
    font-size: 0.75rem;
    color: #f0ad4e;
    margin-top: 0.2rem;
}

.emp-email-warning i {
    margin-right: 0.25rem;
}

.edit-emp-current-label {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ---- Name Setup Banner ---- */
.name-setup-banner {
    background: rgba(255, 105, 180, 0.1);
    border: 1px solid rgba(255, 105, 180, 0.25);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.name-setup-banner i {
    color: var(--accent-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.name-setup-banner .banner-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.name-setup-banner .banner-btn {
    background: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.name-setup-banner .banner-btn:hover {
    opacity: 0.85;
}

/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-bg);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1e2129;
    border: var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
}

.modal-close:hover {
    color: var(--text-primary);
}

.notes-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.note-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.note-item .note-author {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

.note-item .note-content {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.note-item .note-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.note-input-group {
    display: flex;
    gap: 0.5rem;
}

.note-input-group input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.note-input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.note-input-group button {
    padding: 0.6rem 1rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s ease;
}

.note-input-group button:hover {
    background: var(--accent-hover);
}

.modal-admin-controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-edit-btn,
.modal-delete-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-edit-btn {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.modal-edit-btn:hover {
    background: rgba(255, 193, 7, 0.25);
    color: #ffda77;
}

.modal-delete-btn {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.modal-delete-btn:hover {
    background: rgba(220, 53, 69, 0.25);
    color: #ff8a8a;
}

.edit-shift-form {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.edit-shift-form h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.edit-shift-form .form-group-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Styles moved from dashboard.html inline attributes */
#admin-tab,
#mobile-admin-tab {
    display: none;
}

.modal-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

.modal-notes-header {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.modal-notes-header .fa-sticky-note {
    color: var(--accent-color);
}

.edit-shift-form .form-group-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.edit-shift-form label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    display: block;
}

.edit-shift-form input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.edit-shift-form input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.edit-shift-form .form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.form-btn-save,
.form-btn-cancel {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.form-btn-save {
    background: var(--accent-color);
    color: #fff;
}

.form-btn-save:hover {
    background: var(--accent-hover);
}

.form-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.form-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

/* ---- Channel Sidebar ---- */
.channel-section-label {
    padding: 0.6rem 1.25rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
}

.channel-avatar {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--accent-color) !important;
    font-size: 0.85rem;
}

.channel-avatar i {
    font-size: 0.85rem;
}

.msg-empty-small {
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

.bubble-sender {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.15rem;
}

/* ---- Tab Badge (unread count) ---- */
.tab-badge {
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ---- Messaging ---- */
.msg-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 400px;
    max-height: 700px;
    padding: 0 !important;
    overflow: hidden;
}

.msg-sidebar {
    width: 300px;
    min-width: 300px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.msg-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.msg-sidebar-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.msg-sidebar-header h3 i {
    color: var(--accent-color);
}

.msg-sidebar-header button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: opacity 0.3s ease;
}

.msg-sidebar-header button:hover {
    opacity: 0.7;
}

.convo-list {
    flex: 1;
    overflow-y: auto;
}

.channel-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-light);
    padding: 0.75rem 1.25rem 0.4rem;
}

.convo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
    font-family: inherit;
    color: inherit;
}

.convo-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ---- FullCalendar Overrides ---- */
:root {
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-day-header-bg: rgba(255, 255, 255, 0.02);
    --fc-today-bg: rgba(255, 105, 180, 0.1);
    --fc-event-bg: rgba(255, 105, 180, 0.2);
    --fc-event-border-color: var(--accent-color);
    --fc-event-text-color: var(--text-primary);
    --fc-alt-event-bg: #28a745;
    --fc-alt-event-border-color: #28a745;
}

#tab-schedule .portal-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin-bottom: 0;
    background: rgba(30, 33, 41, 0.75);
}

#calendar {
    flex-grow: 1;
    color: var(--text-primary);
}

.fc {
    font-size: 0.9rem;
}

/* Toolbar */
.fc-toolbar-title {
    font-size: 1.4rem !important;
    color: var(--text-primary);
    font-weight: 600;
}

.fc .fc-button {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: none !important;
    text-transform: capitalize !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

.fc .fc-button .fc-icon {
    font-size: 1.1rem;
}

.fc .fc-button:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: var(--text-primary) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #fff !important;
}

/* Calendar Grid & Cells */
.fc-theme-standard .fc-scrollgrid,
.fc-theme-standard th, 
.fc-theme-standard td {
    border-color: var(--fc-border-color);
}

.fc .fc-col-header-cell {
    background: var(--fc-day-header-bg);
}

.fc .fc-col-header-cell-cushion {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 0.25rem;
    font-weight: 500;
}

.fc .fc-daygrid-day-number {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem;
    font-size: 0.8rem;
}

.fc .fc-day-today {
    background: var(--fc-today-bg) !important;
}

.fc .fc-day-today .fc-daygrid-day-number {
    color: var(--accent-color);
    font-weight: 700;
}

.fc .fc-timegrid-slot-label-frame {
    text-align: center;
}

.fc .fc-timegrid-slot-label {
    border-color: var(--fc-border-color);
}

/* Events */
.fc-event {
    border-radius: 6px;
    border: 1px solid transparent !important;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.fc-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.fc-event-main {
    padding: 4px 6px;
}

.fc-h-event {
    background: var(--fc-event-bg);
    border-color: var(--fc-event-border-color) !important;
    color: var(--fc-event-text-color);
}

.fc-daygrid-event-dot {
    border-color: var(--accent-color);
}

/* Popover */
.fc-popover {
    background: #2a2e37;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.fc-popover-header {
    background: #313540;
    color: var(--text-primary);
    border-radius: 12px 12px 0 0;
}

/* Event Colors */
.fc-event[data-type="kori"] {
    background: rgba(40, 167, 69, 0.3);
    border-color: rgba(40, 167, 69, 0.8) !important;
}

.fc-event[data-type="kaileigh"] {
    background: rgba(255, 105, 180, 0.3);
    border-color: rgba(255, 105, 180, 0.8) !important;
}

.convo-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.convo-item.active {
    background: rgba(255, 105, 180, 0.1);
    border-right: 2px solid var(--accent-color);
}

.convo-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    position: relative;
}

.channel-avatar {
    background: rgba(255, 105, 180, 0.15);
    color: var(--accent-color);
}

.convo-info {
    flex: 1;
    min-width: 0;
}

.convo-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.convo-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.convo-time {
    font-size: 0.65rem;
    color: var(--text-light);
    white-space: nowrap;
    flex-shrink: 0;
}

.convo-preview-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.convo-preview {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.convo-unread {
    background: var(--accent-color);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

.msg-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.msg-chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.msg-back-btn {
    display: block;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.msg-back-btn:hover {
    color: var(--accent-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    scroll-behavior: smooth;
}

/* Date separators between messages */
.chat-date-sep {
    text-align: center;
    padding: 0.75rem 0;
    position: relative;
}

.chat-date-sep span {
    background: var(--bg-primary, #1e2129);
    padding: 0.2rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text-light);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

/* Message grouping */
.chat-bubble {
    max-width: 75%;
    padding: 0.55rem 0.85rem;
    border-radius: 16px;
    font-size: 0.87rem;
    line-height: 1.45;
    word-wrap: break-word;
    animation: bubbleIn 0.2s ease-out;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--accent-color);
    color: #fff;
    border-bottom-right-radius: 4px;
    margin-left: 15%;
}

.chat-bubble.sent.grouped {
    border-top-right-radius: 6px;
    margin-top: -0.1rem;
}

.chat-bubble.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    margin-right: 15%;
}

.chat-bubble.received.grouped {
    border-top-left-radius: 6px;
    margin-top: -0.1rem;
}

.bubble-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bubble-content a:hover {
    opacity: 0.8;
}

.bubble-time {
    font-size: 0.6rem;
    opacity: 0.6;
    margin-top: 0.2rem;
}

.chat-bubble.sent .bubble-time {
    text-align: right;
}

/* Scroll to bottom button */
.scroll-bottom-btn {
    position: absolute;
    bottom: 0.75rem;
    right: 1.25rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
    transition: opacity 0.2s;
    font-size: 0.85rem;
}

.scroll-bottom-btn.visible {
    display: flex;
}

.scroll-bottom-btn:hover {
    opacity: 0.85;
}

/* Sending state */
.chat-bubble.sending {
    opacity: 0.6;
}

.msg-input-bar {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    align-items: center;
}

.msg-input-bar input[type="text"] {
    flex: 1;
    padding: 0.65rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.87rem;
    transition: border-color 0.2s;
}

.msg-input-bar input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.07);
}

.msg-input-bar button {
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.msg-input-bar button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.msg-input-bar button:active {
    transform: scale(0.95);
}

.msg-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    font-size: 0.87rem;
}

.msg-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

/* Team members list in new convo modal */
.team-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.team-member-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    color: inherit;
}

.team-member-btn:hover {
    background: rgba(255, 105, 180, 0.1);
    border-color: var(--accent-color);
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.member-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ---- Message Search Bar ---- */
.msg-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.msg-search-bar i {
    color: var(--text-light);
    font-size: 0.8rem;
}

.msg-search-bar input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
}

.msg-search-bar input::placeholder {
    color: var(--text-light);
}

/* ---- Read Receipts ---- */
.read-receipt {
    font-size: 0.6rem;
    margin-top: 0.15rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    justify-content: flex-end;
    color: #5bc0de;
}

.read-receipt.unread {
    color: rgba(255, 255, 255, 0.5);
}

/* ---- Pinned Messages ---- */
.pinned-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-color);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pinned-divider {
    border-bottom: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

.pin-btn {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    font-size: 0.6rem;
    padding: 0 0.25rem;
    transition: opacity 0.2s ease;
}

.pin-btn:hover {
    opacity: 1;
    color: var(--accent-color);
}

.pinned-msg {
    border-left: 2px solid var(--accent-color);
}

/* ---- File Attachments ---- */
.hidden-file-input {
    display: none;
}

.msg-attach-btn,
#msg-attach-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-size: 0.95rem;
    cursor: pointer;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#msg-attach-btn:hover {
    color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    background: rgba(255, 105, 180, 0.1) !important;
}

.bubble-attachment {
    margin-bottom: 0.4rem;
}

.attachment-image {
    max-width: 220px;
    max-height: 180px;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s;
}

.attachment-image:hover {
    opacity: 0.9;
}

.attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
    font-size: 0.8rem;
    transition: background 0.2s ease;
}

.attachment-file:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---- Documents Hub ---- */
.docs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.docs-header h3 {
    margin: 0;
}

.docs-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.doc-filter-select {
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.8rem;
}

.doc-filter-select option {
    background: #1e2129;
}

.doc-upload-btn {
    padding: 0.5rem 1rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-upload-btn:hover {
    background: var(--accent-hover);
}

.hidden-admin {
    display: none !important;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.doc-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 105, 180, 0.1);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.doc-info {
    flex: 1;
    min-width: 0;
}

.doc-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.doc-category-tag {
    background: rgba(255, 105, 180, 0.15);
    color: var(--accent-color);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.doc-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.8rem;
}

.doc-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.doc-delete-btn:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

/* ---- Profile Settings ---- */
.profile-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-large .avatar-initial {
    font-weight: 700;
    font-size: 3rem;
}

.change-avatar-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.change-avatar-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-form .form-group {
    display: flex;
    flex-direction: column;
}

.profile-form label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.profile-form input {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.profile-form input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.profile-form button[type="submit"] {
    padding: 0.75rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.profile-form button[type="submit"]:hover {
    background: var(--accent-hover);
}

.profile-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ---- Notification Bell ---- */
.notif-wrapper {
    position: relative;
}

.notif-bell {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.notif-bell:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: rgba(255, 105, 180, 0.1);
}

.notif-bell.has-new::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: #ff4757;
    border-radius: 50%;
    border: 2px solid rgba(30, 33, 41, 0.95);
}

.notif-dropdown {
    position: fixed;
    top: 115px;
    left: 1rem;
    width: 320px;
    max-height: 400px;
    background: #282c34;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: none;
    overflow: hidden;
}

.notif-dropdown.visible {
    display: block;
}

.notif-dropdown-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.notif-list {
    overflow-y: auto;
    max-height: 360px;
}

.notif-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.2s ease;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
    background: rgba(255, 105, 180, 0.06);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.notif-icon.notif-msg {
    background: rgba(91, 192, 222, 0.15);
    color: #5bc0de;
}

.notif-icon.notif-channel {
    background: rgba(255, 105, 180, 0.15);
    color: var(--accent-color);
}

.notif-icon.notif-shift {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

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

.notif-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-time {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-top: 0.2rem;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.notif-empty i {
    margin-right: 0.4rem;
    color: var(--accent-color);
}

.notif-loading {
    padding: 1.5rem;
    text-align: center;
    color: var(--accent-color);
}

/* ---- Home Tab ---- */
.home-greeting {
    margin-bottom: 1.5rem;
}

.home-greeting h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    font-weight: 600;
}

.home-greeting p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.home-stat-card {
    background: var(--card-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: var(--card-border);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.home-stat-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.home-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 105, 180, 0.12);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.home-stat-icon.msg-icon {
    background: rgba(91, 192, 222, 0.12);
    color: #5bc0de;
}

.home-stat-icon.channel-icon {
    background: rgba(255, 193, 7, 0.12);
    color: #ffc107;
}

.home-stat-icon.docs-icon {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.home-stat-info {
    display: flex;
    flex-direction: column;
}

.home-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.home-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.home-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.home-panel h4 {
    margin: 0 0 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.home-shift-count {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-color);
    background: rgba(255, 105, 180, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

.home-panel h4 i {
    color: var(--accent-color);
    margin-right: 0.4rem;
}

.home-shift-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-shift-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.home-shift-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-shift-time i {
    color: var(--accent-color);
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

.home-shift-location,
.home-shift-employee {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.home-shift-location i,
.home-shift-employee i {
    margin-right: 0.3rem;
    width: 14px;
    text-align: center;
    font-size: 0.7rem;
}

.home-no-data {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.home-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.home-upcoming-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.home-upcoming-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.home-upcoming-day {
    font-size: 0.65rem;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
}

.home-upcoming-datenum {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.home-upcoming-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.home-upcoming-time {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 500;
}

.home-upcoming-name {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.home-upcoming-loc {
    font-size: 0.7rem;
    color: var(--text-light);
}

/* ---- Loading State ---- */
.portal-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.portal-loading i {
    font-size: 2rem;
    color: var(--accent-color);
    animation: spin 1s linear infinite;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ---- Toast Notifications ---- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: rgba(40, 167, 69, 0.9);
    color: #fff;
}

.toast.error {
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
}

/* ---- Responsive ---- */

/* Medium screens – keep sidebar but tighten spacing */
@media (max-width: 985px) {
    .portal-sidebar {
        top: 95px;
    }

    .notif-dropdown {
        top: 100px;
    }

    .portal-main {
        padding: 1.25rem 1rem 3rem;
    }

    .schedule-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.5rem;
    }

    .schedule-day {
        min-height: 100px;
        padding: 0.5rem;
    }

    .schedule-day.compact {
        min-height: 60px;
    }

    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .schedule-controls {
        width: 100%;
        justify-content: space-between;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .shift-card .shift-name {
        font-size: 0.7rem;
    }

    .shift-card .shift-time {
        font-size: 0.6rem;
    }

    .home-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-panels {
        grid-template-columns: 1fr;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .docs-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .docs-controls {
        width: 100%;
    }

    .doc-filter-select {
        flex: 1;
    }
}

/* Mobile breakpoint – sidebar → bottom nav */
@media (max-width: 768px) {
    .portal-sidebar {
        display: none;
    }

    .portal-main {
        margin-left: 0;
        padding: 0.75rem 0.75rem 1rem;
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    .mobile-top-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.25rem 0.75rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(30, 33, 41, 0.97);
        border-top: 1px solid var(--border-color);
        border-bottom: none;
        box-shadow: none;
        justify-content: space-around;
        align-items: center;
        padding: 0.4rem 0;
        padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
        z-index: 200;
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    /* Hide site footer on portal mobile – bottom nav replaces it */
    footer {
        display: none;
    }

    /* Toast above bottom nav on mobile */
    .toast {
        bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
        right: 1rem;
        left: 1rem;
        text-align: center;
    }

    /* Notification dropdown as mobile panel */
    .notif-dropdown {
        position: fixed;
        top: auto;
        bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        width: 100%;
        max-height: 55vh;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    }

    .notif-dropdown-header {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    .notif-list {
        max-height: calc(55vh - 3.5rem);
    }

    .notif-item {
        padding: 0.85rem 1.25rem;
    }

    .notif-title {
        font-size: 0.85rem;
    }

    .notif-text {
        font-size: 0.8rem;
    }

    .notif-time {
        font-size: 0.7rem;
    }

    /* Messaging mobile layout */
    .msg-container {
        height: calc(100vh - 180px);
        min-height: 350px;
        max-height: none;
    }

    .msg-sidebar {
        width: 100%;
        min-width: 100%;
    }

    .msg-sidebar.hidden {
        display: none;
    }

    .msg-chat {
        display: none;
    }

    .msg-chat.active {
        display: flex;
    }

    .msg-back-btn {
        display: block;
    }

    .chat-bubble {
        max-width: 85%;
    }

    .chat-bubble.sent {
        margin-left: 10%;
    }

    .chat-bubble.received {
        margin-right: 10%;
    }

    .scroll-bottom-btn {
        bottom: 0.5rem;
        right: 0.75rem;
    }
}

/* Small screens */
@media (max-width: 576px) {
    .portal-main {
        padding: 0.5rem 0.5rem 1rem;
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    .portal-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .schedule-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.35rem;
    }

    .schedule-day {
        min-height: 80px;
        padding: 0.4rem;
        border-radius: 8px;
    }

    .schedule-day.compact {
        min-height: 55px;
        padding: 0.3rem;
    }

    .day-header {
        font-size: 0.6rem;
        margin-bottom: 0.3rem;
        padding-bottom: 0.25rem;
    }

    .day-header .day-date {
        font-size: 0.85rem;
    }

    .compact .day-header {
        font-size: 0.55rem;
    }

    .compact .day-header .day-date {
        font-size: 0.75rem;
    }

    .shift-card {
        padding: 0.3rem 0.4rem;
        margin-bottom: 0.25rem;
        border-left-width: 2px;
    }

    .shift-card .shift-name {
        font-size: 0.6rem;
    }

    .shift-card .shift-time {
        font-size: 0.55rem;
    }

    .shift-card.compact {
        padding: 0.2rem 0.3rem;
        margin-bottom: 0.2rem;
    }

    .shift-card.compact .shift-name {
        font-size: 0.55rem;
    }

    .shift-card.compact .shift-time {
        font-size: 0.5rem;
    }

    .schedule-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .view-toggle {
        justify-content: center;
    }

    .week-nav {
        justify-content: center;
        gap: 0.75rem;
    }

    .week-nav span {
        font-size: 0.8rem;
    }

    .add-shift-btn {
        font-size: 0.6rem;
        padding: 0.25rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .request-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .modal {
        margin: 0.5rem;
        padding: 1.25rem;
    }

    .home-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .home-stat-card {
        padding: 0.75rem;
    }

    .home-stat-value {
        font-size: 1.2rem;
    }

    .doc-item {
        flex-wrap: wrap;
    }

    .doc-meta {
        gap: 0.4rem;
    }
}

/* Extra-small screens */
@media (max-width: 380px) {
    .portal-main {
        padding: 0.35rem 0.35rem 1rem;
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    .portal-card {
        padding: 0.75rem;
    }

    .schedule-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.25rem;
    }

    .schedule-day {
        min-height: 70px;
        padding: 0.35rem;
    }

    .home-stats {
        grid-template-columns: 1fr;
    }

    .view-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }
}
