/* =============================================
   PAYROLL MANAGEMENT SYSTEM - Stylesheet
   File: Styles/Style.css
   ============================================= */

/* ---- Reset & Base ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    background: #f0f2f5;
    color: #333;
}
a { color: #2c6fad; text-decoration: none; }
a:hover { text-decoration: underline; color: #1a4d7a; }

/* ---- Master Page Layout ---- */
.wrapper { min-height: 100vh; display: flex; flex-direction: column; }

/* ---- Header ---- */
.header {
    background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 100%);
    color: #fff;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}
.header .logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.header .logo span { color: #f9c74f; }
.header .header-right { display: flex; align-items: center; gap: 18px; }
.header .user-info { font-size: 13px; }
.header .user-info strong { color: #f9c74f; }
.btn-logout {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.28); }

/* ---- Sidebar ---- */
.sidebar {
    width: 220px;
    background: #1e2a38;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    z-index: 999;
    transition: width 0.3s;
}
.sidebar .menu-heading {
    color: #8a9bb0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 18px 18px 6px 18px;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    color: #c5cfd9;
    font-size: 13.5px;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}
.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: rgba(44,111,173,0.25);
    color: #fff;
    border-left-color: #2c6fad;
    text-decoration: none;
}
.sidebar ul li a .icon { font-size: 16px; width: 20px; text-align: center; }

/* ---- Main Content ---- */
.main-content {
    margin-left: 220px;
    margin-top: 60px;
    padding: 24px;
    flex: 1;
}

/* ---- Page Title ---- */
.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a3a5c;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}
.page-title small {
    font-size: 13px;
    color: #888;
    font-weight: 400;
    margin-left: 8px;
}

/* ---- Cards / Panels ---- */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e9ecef;
    font-size: 15px;
    font-weight: 600;
    color: #1a3a5c;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body { padding: 20px; }

/* ---- Dashboard Stats ---- */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-box {
    flex: 1;
    min-width: 160px;
    background: #fff;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border-left: 4px solid #2c6fad;
    display: flex;
    align-items: center;
    gap: 14px;
}
.stat-box.green  { border-left-color: #28a745; }
.stat-box.orange { border-left-color: #fd7e14; }
.stat-box.red    { border-left-color: #dc3545; }
.stat-box.purple { border-left-color: #6f42c1; }
.stat-box .stat-icon { font-size: 30px; opacity: 0.7; }
.stat-box .stat-info .stat-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: #1a3a5c;
}
.stat-box .stat-info .stat-label {
    font-size: 12px;
    color: #888;
    margin-top: 3px;
}

/* ---- Form Styles ---- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.form-group label .req { color: #dc3545; margin-left: 2px; }
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: #2c6fad;
    box-shadow: 0 0 0 3px rgba(44,111,173,0.15);
    outline: none;
}
select.form-control { height: 38px; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.btn-primary { background: #2c6fad; color: #fff; }
.btn-primary:hover { background: #1a4d7a; }
.btn-success { background: #28a745; color: #fff; }
.btn-success:hover { background: #1e7e34; }
.btn-danger  { background: #dc3545; color: #fff; }
.btn-danger:hover  { background: #b02a37; }
.btn-warning { background: #fd7e14; color: #fff; }
.btn-warning:hover { background: #d96a0a; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #545b62; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

/* ---- Table ---- */
.table-responsive { overflow-x: auto; }
table.grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
table.grid thead tr {
    background: #1a3a5c;
    color: #fff;
}
table.grid thead th {
    padding: 10px 14px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}
table.grid tbody tr { border-bottom: 1px solid #e9ecef; }
table.grid tbody tr:hover { background: #f0f6ff; }
table.grid tbody td { padding: 9px 14px; vertical-align: middle; }
table.grid tbody tr:nth-child(even) { background: #f8f9fa; }
table.grid tbody tr:nth-child(even):hover { background: #f0f6ff; }
.no-data { text-align: center; padding: 30px; color: #999; font-style: italic; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11.5px;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info    { background: #d1ecf1; color: #0c5460; }

/* ---- Alert Messages ---- */
.alert {
    padding: 12px 16px;
    border-radius: 5px;
    margin-bottom: 16px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.alert-danger  { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }
.alert-warning { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; }
.alert-info    { background: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460; }

/* ---- Login Page ---- */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3a5c 0%, #2c6fad 60%, #4a90c4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px;
    width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.login-box .login-logo {
    text-align: center;
    margin-bottom: 26px;
}
.login-box .login-logo h2 {
    color: #1a3a5c;
    font-size: 22px;
    font-weight: 700;
}
.login-box .login-logo p {
    color: #888;
    font-size: 13px;
    margin-top: 4px;
}
.login-box .login-logo .icon-wrap {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #1a3a5c, #2c6fad);
    border-radius: 50%;
    margin: 0 auto 12px auto;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #fff;
}
.login-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 22px;
}
.login-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-size: 14px;
}
.login-tab.active { color: #2c6fad; border-bottom-color: #2c6fad; }
.login-tab:hover { color: #2c6fad; }

/* ---- Footer ---- */
.footer {
    background: #1e2a38;
    color: #8a9bb0;
    text-align: center;
    padding: 12px;
    font-size: 12.5px;
    margin-left: 220px;
}
.footer a { color: #2c6fad; }

/* ---- Payslip Print ---- */
@media print {
    .sidebar, .header, .footer, .no-print { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    .payslip { border: 1px solid #333; padding: 20px; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .main-content { margin-left: 0; }
    .footer { margin-left: 0; }
    .stats-row { flex-direction: column; }
}
