/* styles_system.css - Main stylesheet for HRIS System */

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #343a40;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 15px 18px;
    text-align: center;
    background-color: #23272b;
    border-bottom: 1px solid #4f5962;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 65px;
}

.sidebar-brand img {
    max-height: 45px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav {
    list-style: none;
    padding-top: 15px;
    flex-grow: 1;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #c2c7d0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active > a {
    background-color: #4f5962;
    color: #fff;
    border-left: 4px solid #007bff;
}

/* Main Wrapper */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    min-width: 0;
}

/* Topbar */
.topbar {
    background-color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    z-index: 10;
}

.datetime-display {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.user-detail {
    font-size: 12px;
    color: #888;
}

.btn-logout {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Content Area */
.content-body {
    padding: 25px;
    flex-grow: 1;
    overflow-y: auto;
    min-width: 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
}

/* Metric Cards (Grid System) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.metric-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid #007bff;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.metric-card.success { border-left-color: #28a745; }
.metric-card.warning { border-left-color: #ffc107; }
.metric-card.danger { border-left-color: #dc3545; }
.metric-card.info { border-left-color: #17a2b8; }

.metric-info h4 {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.metric-info p {
    font-size: 26px;
    font-weight: 700;
    color: #2c3e50;
}

/* Card Container */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f4f6f9;
}

/* Data Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-top: 15px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

.data-table th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background-color: #e6f4ea; color: #1e7e34; }
.badge-warning { background-color: #fff8e6; color: #d39e00; }
.badge-danger { background-color: #fce8e6; color: #bd2130; }
.badge-info { background-color: #e8f4f8; color: #117a8b; }
.badge-secondary { background-color: #e9ecef; color: #495057; }

/* Buttons & Controls */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background-color: #007bff; color: #fff; }
.btn-primary:hover { background-color: #0056b3; }

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

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

.btn-secondary { background-color: #6c757d; color: #fff; }
.btn-secondary:hover { background-color: #5a6268; }

.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Search Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-control {
    max-width: 250px;
}
