/* Workforce Management System - Complete CSS */

:root {
    --bg: #0b1220;
    --panel: #0f172a;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e5e7eb;
    --green: #22c55e;
    --red: #ef4444;
    --blue: #3b82f6;
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --cyan: #06b6d4;
    --gray: #6b7280;
    --light: #f8fafc;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: #0f172a;
    background: #f8fafc;
}

a { color: inherit; text-decoration: none; }

/* Login Styles */
.login-page, .install-page {
    background: url('/WORKFORCE-MANAGEMENT-SYSTEM/assets/login-bg.png') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-page {
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: none;
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 999px;
    left: -220px;
    top: -220px;
    background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.35), transparent 60%);
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
}

.login-page::after {
    content: none;
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    right: -260px;
    bottom: -260px;
    background: radial-gradient(circle at 30% 30%, rgba(236, 72, 153, 0.26), transparent 60%);
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
}

/* Force explicit SR login background image */
.login-page.login-sr {
    background-image: url('/WORKFORCE-MANAGEMENT-SYSTEM/assets/login-bg.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    background-color: #e5e7eb !important;
}

.login-page.login-sr::before,
.login-page.login-sr::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

.login-card {
    width: 420px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(248,250,252,0.78) 100%);
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 18px;
    padding: 22px;
    box-shadow:
        0 18px 50px rgba(2, 6, 23, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.7) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: loginIn 0.55s ease both;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-sr-card {
    width: 460px;
    padding: 34px 28px 26px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 35px 80px rgba(2, 6, 23, 0.10),
        0 1px 0 rgba(255,255,255,0.85) inset;
    overflow: hidden;
    position: relative;
}

.login-sr-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-sr-logo {
    margin-bottom: 12px;
}

.login-sr-tagline {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.login-sr-tagline-under-logo {
    margin-top: -8px;
}

.login-sr-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-sr-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.login-sr-label > div {
    margin-bottom: 8px;
}

.login-sr-input-wrap {
    position: relative;
}

.login-sr-leading {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.login-sr-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.login-sr-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-sr-button {
    padding: 14px 24px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.login-sr-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-sr-footnote {
    text-align: center;
    margin-top: 24px;
}

.login-sr-install {
    color: var(--blue);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-sr-install:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #dcfce7;
}

/* Main Layout */
.wm-body {
    margin: 0;
    background: var(--light);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
}

.wm-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.wm-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.wm-brand {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.wm-brand-logo {
    max-width: 100%;
    height: auto;
}

/* Navigation */
.wm-nav {
    flex: 1;
    padding: 16px;
}

.wm-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--gray);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.wm-nav-link:hover {
    background: var(--light);
    color: var(--text);
}

.wm-nav-link.active {
    background: var(--blue);
    color: white;
}

.wm-nav-ic {
    margin-right: 12px;
    font-size: 16px;
}

.wm-side-bottom {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.wm-logout {
    display: block;
    padding: 12px 16px;
    color: var(--red);
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: all 0.2s ease;
}

.wm-logout:hover {
    background: #fef2f2;
}

/* Main Content */
.wm-main {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
}

/* Header */
.wm-head {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wm-head h1 {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.wm-head p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.wm-user {
    text-align: right;
    font-weight: 600;
}

.wm-user span {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

/* Content Area */
.wm-content {
    flex: 1;
    padding: 32px;
}

/* Panels */
.wm-panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.wm-panel h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

/* Statistics */
.wm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.wm-stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wm-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wm-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.wm-si-blue { background: #dbeafe; color: var(--blue); }
.wm-si-green { background: #d1fae5; color: var(--green); }
.wm-si-orange { background: #fed7aa; color: var(--orange); }
.wm-si-purple { background: #ede9fe; color: var(--purple); }

.wm-stat-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.wm-stat-trend.up {
    background: #dcfce7;
    color: var(--green);
}

.wm-stat-title {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.wm-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

/* Buttons */
.wm-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 14px;
}

.wm-btn-primary {
    background: var(--blue);
    color: white;
}

.wm-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.wm-btn-secondary {
    background: var(--gray);
    color: white;
}

.wm-btn-secondary:hover {
    background: #4b5563;
}

.wm-btn-danger {
    background: var(--red);
    color: white;
}

.wm-btn-danger:hover {
    background: #dc2626;
}

/* Forms */
.wm-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.wm-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.wm-form-group input,
.wm-form-group select,
.wm-form-group textarea {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.wm-form-group input:focus,
.wm-form-group select:focus,
.wm-form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
}

.wm-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.wm-form-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.wm-form-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.wm-form-help {
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
}

.wm-assign-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.wm-assign-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.wm-assign-option input[type="checkbox"] {
    margin-top: 3px;
}

.wm-assign-option span {
    display: flex;
    flex-direction: column;
}

.wm-assign-option strong {
    font-size: 13px;
    color: var(--text);
}

.wm-assign-option small {
    font-size: 12px;
    color: var(--muted);
}

/* Employee Management */
.wm-employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.wm-employee-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s ease;
}

.wm-employee-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.wm-employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--light);
}

.wm-employee-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.wm-employee-avatar.large {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

.wm-employee-actions {
    display: flex;
    gap: 8px;
}

.wm-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.wm-action-btn:hover {
    background: var(--light);
    color: var(--text);
}

.wm-action-btn-danger:hover {
    background: #fef2f2;
    color: var(--red);
    border-color: var(--red);
}

.wm-employee-info {
    padding: 20px;
}

.wm-employee-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.wm-employee-id,
.wm-employee-position,
.wm-employee-department {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--muted);
}

.wm-emp-lbl {
    font-weight: 600;
    color: var(--text);
    margin-right: 4px;
}

.wm-employee-stats {
    display: flex;
    gap: 16px;
    margin: 12px 0;
}

.wm-emp-stat {
    font-size: 14px;
    color: var(--muted);
}

.wm-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.wm-status-pill {
    border-radius: 12px;
    padding: 6px 12px;
}

.wm-status.active { background: #dcfce7; color: var(--green); }
.wm-status.inactive { background: #fef2f2; color: var(--red); }

/* Toolbar */
.wm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.wm-search {
    position: relative;
}

.wm-search-input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
}

/* Empty State */
.wm-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.wm-empty-wide {
    grid-column: 1 / -1;
}

.wm-empty-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text);
}

.wm-empty-text {
    margin: 0 0 24px 0;
}

/* Page Navigation */
.wm-page-nav {
    margin-bottom: 24px;
}

.wm-back-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.wm-back-link:hover {
    text-decoration: underline;
}

.wm-page-nav-sep {
    margin: 0 8px;
    color: var(--muted);
}

/* Inline Forms */
.wm-inline-form {
    display: inline;
}

.wm-inline-form button {
    background: none;
    border: none;
    cursor: pointer;
}

/* Projects grid cards */
.wm-project-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    max-height: calc(100vh - 235px);
    overflow: auto;
    padding-right: 6px;
}

.wm-project-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe5f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.wm-project-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: 0 18px 30px rgba(30, 64, 175, 0.12);
}

.wm-project-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wm-project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.wm-project-color {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 2px solid #ffffff;
    box-shadow: 0 8px 14px rgba(15, 23, 42, 0.14);
}

.wm-project-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wm-project-actions .wm-action-btn {
    width: auto;
    height: auto;
    border-radius: 999px;
    border: 1px solid #dbe5f0;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    line-height: 1.1;
}

.wm-project-actions .wm-action-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.wm-project-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.15;
    color: #0f172a;
}

.wm-project-client {
    margin: 0 0 3px 0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
}

.wm-project-location {
    margin: 0 0 10px 0;
    color: #64748b;
    font-size: 12px;
    min-height: 18px;
}

.wm-project-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.wm-project-dates {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #64748b;
}

.wm-project-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.wm-project-stats .wm-stat {
    margin: 0;
    color: #334155;
    font-weight: 700;
}

.wm-project-bottom {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wm-budget {
    font-size: 13px;
    font-weight: 800;
    color: #047857;
}

.wm-filters {
    display: flex;
    align-items: center;
}

.wm-filters .wm-filter {
    appearance: none;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    min-width: 165px;
}

.wm-filters .wm-filter:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .wm-sidebar {
        transform: translateX(-100%);
    }
    
    .wm-main {
        margin-left: 0;
    }
    
    .wm-stats {
        grid-template-columns: 1fr;
    }
    
    .wm-form-row {
        grid-template-columns: 1fr;
    }
    
    .wm-toolbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .wm-search-input {
        width: 100%;
    }
}

/* Animations */
@keyframes loginIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
