Files
hr-portal/designs/06-leave-management.html
T
2026-05-04 15:56:20 +00:00

347 lines
21 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>HR Portal — Leave Management</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: #F8FAFC; color: #0F172A; display: flex; min-height: 100vh; }
.sidebar { width: 240px; min-height: 100vh; background: #1E293B; display: flex; flex-direction: column; flex-shrink: 0; position: fixed; top: 0; left: 0; bottom: 0; }
.sidebar-logo { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon { width: 36px; height: 36px; background: #4F46E5; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-logo-text { font-size: 15px; font-weight: 700; color: #fff; }
.sidebar-logo-sub { font-size: 11px; color: #94A3B8; margin-top: 1px; }
.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-section-label { font-size: 10px; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: 0.8px; padding: 12px 20px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px; font-size: 14px; font-weight: 500; color: #94A3B8; cursor: pointer; border-left: 3px solid transparent; text-decoration: none; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,0.05); }
.nav-item.active { color: #818CF8; background: rgba(79,70,229,0.15); border-left-color: #4F46E5; font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.avatar-sm { width: 34px; height: 34px; border-radius: 50%; background: #4F46E5; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #E2E8F0; }
.sidebar-user-role { font-size: 11px; color: #64748B; }
.main { margin-left: 240px; flex: 1; display: flex; flex-direction: column; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 10; }
.topbar-title { font-size: 16px; font-weight: 600; color: #0F172A; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.icon-btn { width: 38px; height: 38px; border-radius: 8px; background: #F1F5F9; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; }
.icon-btn svg { width: 18px; height: 18px; color: #64748B; }
.notif-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: #EF4444; border-radius: 50%; border: 2px solid #fff; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #4F46E5; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; }
.topbar-user-name { font-size: 14px; font-weight: 600; color: #0F172A; }
.topbar-user-id { font-size: 12px; color: #64748B; }
.content { padding: 28px; flex: 1; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 20px; font-weight: 700; color: #0F172A; }
.page-subtitle { font-size: 13px; color: #64748B; margin-top: 3px; }
.btn-primary { background: #4F46E5; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; display: flex; align-items: center; gap: 8px; }
.btn-primary svg { width: 16px; height: 16px; }
/* LEAVE BALANCE CARDS */
.balance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.balance-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.07); border: 1px solid #F1F5F9; }
.balance-type { font-size: 12px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.balance-ring { display: flex; align-items: center; gap: 14px; }
.ring-wrapper { position: relative; width: 56px; height: 56px; }
.ring-wrapper svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #F1F5F9; stroke-width: 5; }
.ring-fg { fill: none; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.5s; }
.ring-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 14px; font-weight: 800; color: #0F172A; }
.balance-info {}
.balance-remaining { font-size: 24px; font-weight: 800; color: #0F172A; }
.balance-total { font-size: 12px; color: #94A3B8; }
.balance-used { font-size: 11px; font-weight: 600; margin-top: 4px; }
/* APPLY LEAVE FORM */
.form-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.07); border: 1px solid #F1F5F9; margin-bottom: 24px; }
.form-title { font-size: 15px; font-weight: 700; color: #0F172A; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }
.form-title svg { width: 18px; height: 18px; color: #4F46E5; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 600; color: #374151; }
input, select, textarea { padding: 9px 12px; border: 1.5px solid #E2E8F0; border-radius: 8px; font-size: 13px; font-family: 'Inter', sans-serif; color: #0F172A; background: #fff; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: #4F46E5; }
textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-outline { background: #fff; color: #64748B; border: 1.5px solid #E2E8F0; border-radius: 8px; padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }
.btn-submit { background: #4F46E5; color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }
.duration-note { background: #EEF2FF; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #4F46E5; font-weight: 600; margin-bottom: 16px; }
/* TABLE */
.table-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.07); border: 1px solid #F1F5F9; overflow: hidden; }
.table-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #F1F5F9; }
.table-title { font-size: 14px; font-weight: 700; color: #0F172A; }
table { width: 100%; border-collapse: collapse; }
thead th { background: #F8FAFC; padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 700; color: #64748B; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #E2E8F0; }
tbody td { padding: 13px 16px; font-size: 13px; color: #374151; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-green { background: #ECFDF5; color: #059669; }
.badge-amber { background: #FFFBEB; color: #D97706; }
.badge-red { background: #FEF2F2; color: #DC2626; }
.badge-indigo { background: #EEF2FF; color: #4F46E5; }
.badge-gray { background: #F1F5F9; color: #475569; }
</style>
</head>
<body>
<aside class="sidebar">
<div class="sidebar-logo">
<div class="sidebar-logo-icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/>
<path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>
</svg>
</div>
<div>
<div class="sidebar-logo-text">TechCorp HR</div>
<div class="sidebar-logo-sub">Employee Portal</div>
</div>
</div>
<nav class="sidebar-nav">
<div class="nav-section-label">Main Menu</div>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/></svg>Dashboard</a>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>My Profile</a>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>Attendance</a>
<a class="nav-item active" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 11l3 3L22 4"/><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"/></svg>Leave</a>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>Payslips</a>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>Reimbursements</a>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>Tax &amp; Form 16</a>
<a class="nav-item" href="#"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>Announcements</a>
</nav>
<div class="sidebar-footer">
<div class="sidebar-user">
<div class="avatar-sm">RS</div>
<div>
<div class="sidebar-user-name">Rahul Sharma</div>
<div class="sidebar-user-role">EMP-00247 · Engineering</div>
</div>
</div>
</div>
</aside>
<div class="main">
<header class="topbar">
<div class="topbar-title">Leave Management</div>
<div class="topbar-right">
<button class="icon-btn"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg><span class="notif-dot"></span></button>
<div class="topbar-user">
<div><div class="topbar-user-name">Rahul Sharma</div><div class="topbar-user-id">EMP-00247</div></div>
<div class="avatar">RS</div>
</div>
</div>
</header>
<div class="content">
<div class="page-header">
<div>
<div class="page-title">My Leave</div>
<div class="page-subtitle">FY 202526 · Balance and history</div>
</div>
<button class="btn-primary">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
Apply Leave
</button>
</div>
<!-- LEAVE BALANCE CARDS -->
<div class="balance-grid">
<!-- CL -->
<div class="balance-card">
<div class="balance-type">Casual Leave <span style="color:#4F46E5;">CL</span></div>
<div class="balance-ring">
<div class="ring-wrapper">
<svg width="56" height="56" viewBox="0 0 56 56">
<circle class="ring-bg" cx="28" cy="28" r="22"/>
<circle class="ring-fg" cx="28" cy="28" r="22" stroke="#4F46E5" stroke-dasharray="138.23" stroke-dashoffset="46"/>
</svg>
<div class="ring-text">8</div>
</div>
<div class="balance-info">
<div class="balance-remaining">8 <span style="font-size:13px;color:#94A3B8;font-weight:500;">left</span></div>
<div class="balance-total">of 12 total</div>
<div class="balance-used" style="color:#4F46E5;">4 used</div>
</div>
</div>
</div>
<!-- SL -->
<div class="balance-card">
<div class="balance-type">Sick Leave <span style="color:#10B981;">SL</span></div>
<div class="balance-ring">
<div class="ring-wrapper">
<svg width="56" height="56" viewBox="0 0 56 56">
<circle class="ring-bg" cx="28" cy="28" r="22"/>
<circle class="ring-fg" cx="28" cy="28" r="22" stroke="#10B981" stroke-dasharray="138.23" stroke-dashoffset="23"/>
</svg>
<div class="ring-text">10</div>
</div>
<div class="balance-info">
<div class="balance-remaining">10 <span style="font-size:13px;color:#94A3B8;font-weight:500;">left</span></div>
<div class="balance-total">of 12 total</div>
<div class="balance-used" style="color:#10B981;">2 used</div>
</div>
</div>
</div>
<!-- EL -->
<div class="balance-card">
<div class="balance-type">Earned Leave <span style="color:#F59E0B;">EL</span></div>
<div class="balance-ring">
<div class="ring-wrapper">
<svg width="56" height="56" viewBox="0 0 56 56">
<circle class="ring-bg" cx="28" cy="28" r="22"/>
<circle class="ring-fg" cx="28" cy="28" r="22" stroke="#F59E0B" stroke-dasharray="138.23" stroke-dashoffset="28"/>
</svg>
<div class="ring-text">12</div>
</div>
<div class="balance-info">
<div class="balance-remaining">12 <span style="font-size:13px;color:#94A3B8;font-weight:500;">left</span></div>
<div class="balance-total">of 15 total</div>
<div class="balance-used" style="color:#F59E0B;">3 used</div>
</div>
</div>
</div>
<!-- LOP -->
<div class="balance-card">
<div class="balance-type">Loss of Pay <span style="color:#EF4444;">LOP</span></div>
<div class="balance-ring">
<div style="text-align:center;width:100%;">
<div style="font-size:28px;font-weight:800;color:#EF4444;">1</div>
<div style="font-size:12px;color:#94A3B8;">day applied</div>
<div style="margin-top:8px;font-size:11px;color:#64748B;line-height:1.5;">Deducted from salary.<br/>Use only when other leaves exhausted.</div>
</div>
</div>
</div>
</div>
<!-- APPLY LEAVE FORM -->
<div class="form-card">
<div class="form-title">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
Apply for Leave
</div>
<div class="form-grid">
<div class="form-group">
<label>Leave Type</label>
<select>
<option>Casual Leave (CL)</option>
<option>Sick Leave (SL)</option>
<option>Earned Leave (EL)</option>
<option>Loss of Pay (LOP)</option>
<option>Maternity Leave</option>
<option>Paternity Leave</option>
</select>
</div>
<div class="form-group">
<label>From Date</label>
<input type="date" value="2026-05-07" />
</div>
<div class="form-group">
<label>To Date</label>
<input type="date" value="2026-05-09" />
</div>
<div class="form-group full">
<label>Reason</label>
<textarea placeholder="Please provide a brief reason for the leave request...">Planning a family trip to Ooty. Have completed all pending tasks and briefed the team.</textarea>
</div>
</div>
<div class="duration-note">
Duration: <strong>3 days</strong> (Thu May 7 to Sat May 9) · After deduction: CL balance will be <strong>5 days</strong>
</div>
<div class="form-actions">
<button class="btn-outline">Cancel</button>
<button class="btn-submit">Submit Request</button>
</div>
</div>
<!-- LEAVE HISTORY TABLE -->
<div class="table-card">
<div class="table-header">
<div class="table-title">Leave History</div>
<select style="width:auto;padding:6px 12px;font-size:12px;">
<option>FY 2025-26</option>
<option>FY 2024-25</option>
</select>
</div>
<table>
<thead>
<tr>
<th>Leave Type</th>
<th>From</th>
<th>To</th>
<th>Days</th>
<th>Reason</th>
<th>Status</th>
<th>Applied On</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="badge badge-indigo">Casual Leave</span></td>
<td>Apr 14, 2026</td>
<td>Apr 14, 2026</td>
<td>1</td>
<td>Personal work</td>
<td><span class="badge badge-green">Approved</span></td>
<td>Apr 12, 2026</td>
</tr>
<tr>
<td><span class="badge" style="background:#ECFDF5;color:#059669;">Sick Leave</span></td>
<td>Mar 22, 2026</td>
<td>Mar 23, 2026</td>
<td>2</td>
<td>Fever and flu — medical certificate attached</td>
<td><span class="badge badge-green">Approved</span></td>
<td>Mar 22, 2026</td>
</tr>
<tr>
<td><span class="badge badge-indigo">Casual Leave</span></td>
<td>Mar 10, 2026</td>
<td>Mar 11, 2026</td>
<td>2</td>
<td>Family function — brother's engagement</td>
<td><span class="badge badge-green">Approved</span></td>
<td>Mar 5, 2026</td>
</tr>
<tr>
<td><span class="badge" style="background:#FFF7ED;color:#C2410C;">Earned Leave</span></td>
<td>Feb 16, 2026</td>
<td>Feb 20, 2026</td>
<td>5</td>
<td>Vacation — Rajasthan trip</td>
<td><span class="badge badge-green">Approved</span></td>
<td>Feb 3, 2026</td>
</tr>
<tr>
<td><span class="badge badge-indigo">Casual Leave</span></td>
<td>May 7, 2026</td>
<td>May 9, 2026</td>
<td>3</td>
<td>Family trip to Ooty</td>
<td><span class="badge badge-amber">Pending</span></td>
<td>May 4, 2026</td>
</tr>
<tr>
<td><span class="badge" style="background:#ECFDF5;color:#059669;">Sick Leave</span></td>
<td>Jan 6, 2026</td>
<td>Jan 6, 2026</td>
<td>1</td>
<td>Migraine</td>
<td><span class="badge badge-red">Rejected</span></td>
<td>Jan 6, 2026</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</body>
</html>