/* Mega HR Panel - Frontend Styles - FULL RESPONSIVE */

:root {
    --primary: #1e3a5f;
    --primary-dark: #15294a;
    --secondary: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --sidebar-width: 240px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    color: var(--dark);
    line-height: 1.6;
}

/* ==================== LOGIN PAGE ==================== */
.hr-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    padding: 20px;
}

.hr-login-container {
    width: 100%;
    max-width: 400px;
}

.hr-login-box {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hr-logo {
    text-align: center;
    margin-bottom: 24px;
}

.hr-logo img {
    max-width: 180px;
    height: auto;
}

.hr-login-box h1 {
    text-align: center;
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 28px;
    color: var(--dark);
}

.hr-form-group {
    margin-bottom: 18px;
}

.hr-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--secondary);
}

.hr-form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hr-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.hr-alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 0.8125rem;
}

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

.hr-login-footer {
    text-align: center;
    margin-top: 20px;
}

.hr-login-footer a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.8125rem;
}

/* ==================== BUTTONS ==================== */
.hr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

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

.hr-btn-primary:hover {
    background: var(--primary-dark);
}

.hr-btn-secondary {
    background: white;
    color: var(--dark);
    border: 1px solid var(--border);
}

.hr-btn-secondary:hover {
    background: var(--light);
}

.hr-btn-block {
    width: 100%;
}

.hr-btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
}

/* ==================== LAYOUT ==================== */
.hr-logged-in {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR ==================== */
.hr-sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.hr-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hr-sidebar-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.hr-sidebar-logo {
    max-width: 150px;
    height: auto;
}

.hr-sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.hr-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.hr-nav-item:hover,
.hr-nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.hr-nav-icon {
    font-size: 1.125rem;
}

.hr-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hr-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.hr-user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.hr-user-name {
    font-weight: 500;
    font-size: 0.8125rem;
}

.hr-user-role {
    font-size: 0.6875rem;
    color: rgba(255,255,255,0.5);
}

.hr-logout-btn {
    display: block;
    width: 100%;
    padding: 8px;
    text-align: center;
    background: rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    transition: background 0.2s;
}

.hr-logout-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* ==================== MAIN CONTENT ==================== */
.hr-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.hr-content {
    padding: 24px;
    max-width: 1400px;
}

.hr-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.hr-page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

.hr-back-link {
    display: block;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    margin-bottom: 6px;
}

/* ==================== STATS GRID ==================== */
.hr-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.hr-stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hr-stat-highlight {
    background: var(--primary);
    color: white;
}

.hr-stat-icon {
    font-size: 1.75rem;
}

.hr-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
}

.hr-stat-label {
    font-size: 0.75rem;
    color: var(--secondary);
    margin-top: 4px;
}

.hr-stat-highlight .hr-stat-label {
    color: rgba(255,255,255,0.8);
}

/* ==================== CARDS ==================== */
.hr-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.hr-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hr-card-header h2,
.hr-card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
}

.hr-card-body {
    padding: 20px;
}

/* ==================== FILTERS - YENİ TASARIM ==================== */
.hr-filters-card {
    margin-bottom: 20px;
}

.hr-filters-card .hr-card-body {
    padding: 0;
}

.hr-filters-form {
    width: 100%;
}

.hr-filters-row {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 10px;
}

.hr-filter-group {
    display: flex;
    flex-direction: column;
}

.hr-filter-group label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hr-filter-group input,
.hr-filter-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8125rem;
    background: white;
}

.hr-filter-group input:focus,
.hr-filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.hr-date-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hr-date-range input {
    flex: 1;
    min-width: 0;
}

.hr-date-range span {
    color: var(--secondary);
    font-size: 0.75rem;
}

.hr-filter-actions {
    display: flex;
    gap: 8px;
}

/* ==================== TABLES ==================== */
.hr-table {
    width: 100%;
    border-collapse: collapse;
}

.hr-table th,
.hr-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.hr-table th {
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--secondary);
    background: var(--light);
}

.hr-table td {
    font-size: 0.8125rem;
}

.hr-table tbody tr:hover {
    background: var(--light);
}

.hr-table-sm th,
.hr-table-sm td {
    padding: 10px 12px;
    font-size: 0.8125rem;
}

/* ==================== STATUS BADGE ==================== */
.hr-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: white;
}

.hr-status-lg {
    padding: 6px 14px;
    font-size: 0.8125rem;
}

/* ==================== PAGINATION ==================== */
.hr-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.hr-page-link {
    padding: 8px 12px;
    background: var(--light);
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.8125rem;
}

.hr-page-link:hover,
.hr-page-link.active {
    background: var(--primary);
    color: white;
}

/* ==================== DETAIL PAGE ==================== */
.hr-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

.hr-detail-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.hr-detail-item {
    margin-bottom: 14px;
}

.hr-detail-item label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.hr-detail-item span,
.hr-detail-item a {
    font-size: 0.875rem;
    color: var(--dark);
}

.hr-detail-full {
    grid-column: 1 / -1;
}

.hr-select-block {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8125rem;
}

/* ==================== NOTES ==================== */
.hr-note-form {
    margin-bottom: 16px;
}

.hr-note-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8125rem;
    resize: vertical;
    margin-bottom: 8px;
}

.hr-notes-list {
    max-height: 350px;
    overflow-y: auto;
}

.hr-note-item {
    padding: 12px;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 10px;
}

.hr-note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.6875rem;
}

.hr-note-header strong {
    color: var(--dark);
}

.hr-note-header span {
    color: var(--secondary);
}

.hr-note-item p {
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ==================== META ==================== */
.hr-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
}

.hr-meta-item:last-child {
    border-bottom: none;
}

.hr-meta-item label {
    color: var(--secondary);
}

/* ==================== UTILITIES ==================== */
.hr-text-center {
    text-align: center;
}

.hr-text-muted {
    color: var(--secondary);
    font-size: 0.8125rem;
}

/* ==================== MOBILE MENU TOGGLE ==================== */
.hr-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media screen and (max-width: 1200px) {
    .hr-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .hr-detail-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hr-filters-row {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Mobile Landscape */
@media screen and (max-width: 992px) {
    :root {
        --sidebar-width: 220px;
    }
    
    .hr-content {
        padding: 20px 16px !important;
    }
    
    .hr-filters-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .hr-detail-row {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile - ANA RESPONSIVE KISIM */
@media screen and (max-width: 768px) {
    /* Menu Toggle Görünsün */
    .hr-menu-toggle {
        display: flex !important;
    }
    
    /* Sidebar Gizle */
    .hr-sidebar {
        transform: translateX(-100%) !important;
        width: 260px !important;
    }
    
    .hr-sidebar.open {
        transform: translateX(0) !important;
    }
    
    /* Main içerik full width */
    .hr-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .hr-content {
        padding: 70px 12px 20px 12px !important;
    }
    
    /* Page Header */
    .hr-page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    .hr-page-header h1 {
        font-size: 1.25rem !important;
    }
    
    /* Stats */
    .hr-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .hr-stat-card {
        padding: 14px !important;
        flex-direction: column !important;
        text-align: center !important;
        gap: 8px !important;
    }
    
    .hr-stat-number {
        font-size: 1.5rem !important;
    }
    
    .hr-stat-icon {
        font-size: 1.5rem !important;
    }
    
    /* Filters - STACK */
    .hr-filters-card {
        margin-bottom: 16px !important;
    }
    
    .hr-filters-card .hr-card-body {
        padding: 0 !important;
    }
    
    .hr-filters-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 16px !important;
        border-radius: 8px !important;
    }
    
    .hr-filter-group {
        width: 100% !important;
    }
    
    .hr-filter-group input,
    .hr-filter-group select {
        width: 100% !important;
        padding: 10px 12px !important;
    }
    
    .hr-date-range {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
    }
    
    .hr-date-range input {
        flex: 1 !important;
    }
    
    .hr-filter-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        width: 100% !important;
    }
    
    .hr-filter-actions .hr-btn {
        flex: 1 !important;
        padding: 12px !important;
    }
    
    /* Table Card */
    .hr-card {
        margin-bottom: 16px !important;
        border-radius: 8px !important;
    }
    
    .hr-card-body {
        padding: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .hr-table {
        min-width: 650px !important;
    }
    
    .hr-table th,
    .hr-table td {
        padding: 10px 8px !important;
        font-size: 0.75rem !important;
    }
    
    /* Pagination */
    .hr-pagination {
        flex-wrap: wrap !important;
        padding: 16px 12px !important;
    }
    
    .hr-page-link {
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
    }
    
    /* Buttons */
    .hr-btn {
        padding: 10px 14px !important;
        font-size: 0.8125rem !important;
    }
    
    .hr-btn-secondary {
        font-size: 0.75rem !important;
    }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
    .hr-login-box {
        padding: 24px 16px !important;
    }
    
    .hr-login-box h1 {
        font-size: 1.125rem !important;
    }
    
    .hr-stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hr-content {
        padding: 65px 10px 16px 10px !important;
    }
    
    .hr-page-header h1 {
        font-size: 1.125rem !important;
    }
    
    .hr-table {
        min-width: 550px !important;
    }
    
    .hr-table th,
    .hr-table td {
        padding: 8px 6px !important;
        font-size: 0.6875rem !important;
    }
}

/* ==================== İLETİŞİM FORMLARI ==================== */

/* Badge for sidebar menu */
.hr-badge {
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

/* Mini stats row */
.hr-stats-mini {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hr-stat-mini {
    background: white;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hr-stat-mini.highlight {
    background: #ef4444;
    color: white;
}

.hr-stat-mini .hr-stat-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.hr-stat-mini .hr-stat-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Type badge */
.hr-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

/* New row highlight */
.hr-row-new {
    background: #fef3c7 !important;
}

.hr-row-new:hover {
    background: #fde68a !important;
}

/* Message box */
.hr-message-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Detail grid */
.hr-detail-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.hr-detail-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hr-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hr-detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.hr-detail-row:last-child {
    border-bottom: none;
}

.hr-detail-row label {
    width: 120px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.hr-detail-row span,
.hr-detail-row a {
    flex: 1;
    color: var(--dark);
}

.hr-detail-row.hr-detail-full {
    flex-direction: column;
}

.hr-detail-row.hr-detail-full label {
    margin-bottom: 8px;
}

/* Status form */
.hr-status-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hr-status-form label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--secondary);
}

.hr-status-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Notes */
.hr-note-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.hr-note-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    resize: vertical;
    font-family: inherit;
}

.hr-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.hr-note-item {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
}

.hr-note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.hr-note-header strong {
    color: var(--primary);
}

.hr-note-header span {
    color: var(--secondary);
}

.hr-note-content {
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* Tech info */
.hr-tech-info {
    font-size: 0.75rem;
    color: var(--secondary);
}

.hr-tech-info div {
    margin-bottom: 6px;
}

/* Danger button */
.hr-btn-danger {
    background: #ef4444;
    color: white;
}

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

/* Back link */
.hr-back-link {
    display: inline-block;
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    margin-bottom: 8px;
}

.hr-back-link:hover {
    color: var(--primary);
}

/* Page header small */
.hr-page-header h1 small {
    font-weight: 400;
    color: var(--secondary);
    font-size: 0.875rem;
    margin-left: 8px;
}

/* Responsive for contact forms */
@media screen and (max-width: 992px) {
    .hr-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .hr-detail-sidebar {
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    .hr-stats-mini {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hr-stat-mini {
        flex-direction: column;
        text-align: center;
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .hr-stats-mini {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hr-detail-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .hr-detail-row label {
        width: 100%;
    }
}

/* Dashboard Grid */
.hr-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.hr-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 20px 0 12px 0;
    color: var(--dark);
}

.hr-section-title:first-of-type {
    margin-top: 0;
}

.hr-table-compact th,
.hr-table-compact td {
    padding: 10px 12px !important;
    font-size: 0.8125rem !important;
}

@media screen and (max-width: 992px) {
    .hr-dashboard-grid {
        grid-template-columns: 1fr;
    }
}