/* ========================================
   EMPLOYEE DETAIL PAGE
   ======================================== */

.employee-detail-page {
    padding: 1.5rem 2rem;
    min-height: calc(100vh - 64px);
    background: var(--rz-gray-50);
}

/* Loading & Error States */
.employee-detail-page .loading-state,
.employee-detail-page .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.error-state .rzi {
    font-size: 3rem;
    color: var(--rz-danger);
}

.error-state p {
    color: var(--rz-gray-600);
    font-size: 1.1rem;
}

/* ========================================
   HEADER
   ======================================== */

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-cost {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-primary-dark) 100%);
    border-radius: 10px;
    color: white;
}

.header-cost .cost-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 0.15rem;
}

.header-cost .cost-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.header-cost .cost-note {
    font-size: 0.55rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.header-toggle {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--rz-gray-50);
    border-radius: 8px;
    border: 1px solid var(--rz-gray-200);
}

.header-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--rz-gray-700);
    font-weight: 500;
}

.back-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--rz-gray-100);
    color: var(--rz-gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.back-button:hover {
    background: var(--rz-gray-200);
    color: var(--rz-gray-900);
}

.back-button .rzi {
    font-size: 1.25rem;
}

.employee-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
}

.header-avatar-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rz-primary-lighter);
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-name-row h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ns-heading);
    margin: 0;
}

.header-subtitle {
    font-size: 0.9rem;
    color: var(--rz-gray-500);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-active {
    background: var(--ns-success-bg);
    color: var(--ns-success-text);
}

.status-inactive {
    background: var(--rz-gray-100);
    color: var(--rz-gray-600);
}

.status-terminated {
    background: var(--ns-danger-bg);
    color: var(--ns-danger-text);
}

/* ========================================
   CONTENT GRID
   ======================================== */

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.detail-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================
   CARDS
   ======================================== */

.detail-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rz-gray-100);
}

.card-header .rzi {
    font-size: 1.25rem;
    color: var(--rz-primary);
}

.card-header.emergency .rzi {
    color: var(--rz-danger);
}

.card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ns-heading);
    margin: 0;
}

.card-body {
    padding: 1.25rem;
}

/* Info Fields */
.info-field {
    margin-bottom: 1rem;
}

.info-field:last-child {
    margin-bottom: 0;
}

.info-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--rz-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-field span {
    font-size: 0.9rem;
    color: var(--ns-heading);
    font-weight: 500;
}

.info-field .salary-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ns-heading);
}

/* Info Row (side by side) */
.info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-row:last-child {
    margin-bottom: 0;
}

/* ========================================
   BENEFITS SECTION
   ======================================== */

.benefits-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.benefit-item label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--rz-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.benefit-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.benefit-accumulate {
    background: var(--rz-primary);
    color: white;
}

.benefit-monthly {
    background: var(--rz-secondary);
    color: white;
}

.benefit-undefined {
    background: var(--rz-gray-200);
    color: var(--rz-gray-600);
}

/* Benefit with eligibility date */
.benefit-with-date {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.eligibility-pending {
    font-size: 0.7rem;
    color: var(--rz-gray-500);
    font-style: italic;
}

.eligibility-active {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--rz-success);
    font-weight: 500;
}

.eligibility-active .rzi {
    font-size: 0.875rem;
}

/* Benefits Section inside Contract */
.benefits-section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rz-gray-100);
}

.benefits-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rz-gray-600);
    margin-bottom: 1rem;
}

.benefits-header .rzi {
    font-size: 1rem;
    color: var(--rz-primary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.benefit-item-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--rz-gray-50);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.benefit-item-compact:hover {
    background: white;
    border-color: var(--rz-gray-200);
}

.benefit-item-compact.editing {
    background: white;
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.benefit-item-compact label {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--rz-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    cursor: pointer;
}

.benefit-item-compact .region-hint {
    text-transform: none;
    font-weight: 400;
    color: var(--rz-gray-400);
}

.benefit-edit {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.benefit-with-status {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (max-width: 992px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   COST CARD
   ======================================== */

.cost-card {
    background: linear-gradient(135deg, var(--rz-primary) 0%, var(--rz-primary-dark) 100%);
    color: white;
}

.cost-header {
    padding: 1rem 1.25rem 0.5rem;
}

.cost-header span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.cost-body {
    padding: 0 1.25rem 1.25rem;
}

.cost-amount {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.cost-note {
    font-size: 0.75rem;
    opacity: 0.85;
    margin: 0.75rem 0 0 0;
    line-height: 1.4;
}

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

@media (max-width: 1200px) {
    .detail-content {
        grid-template-columns: 1fr 1fr;
    }

    .detail-column:nth-child(3) {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .employee-detail-page {
        padding: 1rem;
    }

    .detail-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        align-items: center;
        justify-content: space-between;
    }

    .header-left {
        flex: 1;
        min-width: 0;
    }

    .header-right {
        flex-shrink: 0;
    }

    .header-cost {
        padding: 0.5rem 1rem;
    }

    .header-cost .cost-value {
        font-size: 1.25rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-column:nth-child(3) {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .header-name-row {
        flex-wrap: wrap;
    }

    .header-name-row h1 {
        font-size: 1.25rem;
    }
}

/* ========================================
   INLINE EDIT
   ======================================== */

.editable-field {
    padding: 0.75rem;
    margin: -0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.editable-field:hover:not(.editing) {
    background: var(--rz-gray-50);
}

.editable-field:hover:not(.editing) .field-value::after {
    content: "✎";
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: var(--rz-gray-400);
}

.editable-field.editing {
    background: var(--rz-primary-lighter);
    cursor: default;
}

.editable-field label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--rz-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.field-value {
    font-size: 0.9rem;
    color: var(--ns-heading);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.field-value.salary {
    font-size: 1rem;
    font-weight: 600;
}

.field-value.empty {
    color: var(--rz-gray-400);
    font-style: italic;
    font-weight: 400;
}

/* Edit Input Group */
.edit-input-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.edit-input {
    flex: 1;
    min-width: 0;
}

.edit-inputs-row {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.edit-inputs-row .edit-input {
    flex: 1;
}

.edit-inputs-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.edit-input-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.edit-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #856404;
    line-height: 1.4;
}

.edit-warning .rzi {
    font-size: 1rem;
    color: #ffc107;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.edit-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.save-btn,
.cancel-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

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

.save-btn:hover:not(:disabled) {
    background: var(--rz-primary-dark);
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cancel-btn {
    background: var(--rz-gray-200);
    color: var(--rz-gray-600);
}

.cancel-btn:hover {
    background: var(--rz-gray-300);
}

.save-btn .rzi,
.cancel-btn .rzi {
    font-size: 1rem;
}

/* Benefit Field */
.benefit-field {
    margin-bottom: 0.5rem;
}

.benefit-field:last-child {
    margin-bottom: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .edit-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .edit-actions {
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .edit-inputs-row {
        flex-direction: column;
    }
}

/* ========================================
   CONTRACT HISTORY
   ======================================== */

.contract-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contract-history-item {
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid var(--rz-gray-300);
    background: var(--rz-gray-50);
}

.contract-history-item.active {
    border-left-color: var(--rz-primary);
    background: var(--rz-primary-lighter);
}

.contract-history-item.inactive {
    opacity: 0.8;
}

.contract-period {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.contract-dates {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ns-heading);
}

.contract-status {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.contract-status.active {
    background: var(--ns-success-bg);
    color: var(--ns-success-text);
}

.contract-status.terminated {
    background: var(--rz-gray-200);
    color: var(--rz-gray-600);
}

.contract-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.contract-position {
    font-size: 0.85rem;
    color: var(--rz-gray-700);
}

.contract-salary {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ns-heading);
}

.contract-type-badge {
    font-size: 0.65rem;
    color: var(--rz-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   DOCUMENTS SECTION
   ======================================== */

.documents-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.documents-card .card-header h3 {
    flex: 1;
}

.documents-card .header-action-btn {
    margin-left: auto;
}

.documents-card .header-action-btn.rz-button {
    line-height: normal;
}

.documents-card .header-action-btn .rz-button-text {
    vertical-align: middle;
}

.documents-body {
    padding: 1rem 1.25rem;
}

.empty-documents {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--rz-gray-400);
}

.empty-documents .rzi {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-documents p {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    color: var(--rz-gray-600);
}

.empty-documents span {
    font-size: 0.75rem;
}

.document-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--rz-gray-50);
    transition: background 0.15s;
}

.document-item:hover {
    background: var(--rz-gray-100);
}

.document-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.document-icon .rzi {
    font-size: 1.1rem;
}

.document-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.document-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ns-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    font-size: 0.7rem;
    color: var(--rz-gray-500);
}

.document-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.doc-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--rz-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.doc-action-btn:hover {
    background: var(--rz-gray-200);
    color: var(--rz-gray-700);
}

.doc-action-btn.delete:hover {
    background: var(--ns-danger-bg);
    color: var(--rz-danger);
}

.doc-action-btn .rzi {
    font-size: 0.9rem;
}

/* ========================================
   UPLOAD DIALOG
   ======================================== */

.upload-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.upload-dialog {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 440px;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rz-gray-100);
}

.upload-dialog-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ns-heading);
    margin: 0;
}

.upload-dialog-header .close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--rz-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.upload-dialog-header .close-btn:hover {
    background: var(--rz-gray-100);
    color: var(--rz-gray-700);
}

.upload-dialog-body {
    padding: 1.25rem;
}

.upload-dialog-body .form-group {
    margin-bottom: 1rem;
}

.upload-dialog-body .form-group:last-child {
    margin-bottom: 0;
}

.upload-dialog-body .form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rz-gray-600);
    margin-bottom: 0.5rem;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--rz-gray-300);
    border-radius: 8px;
    background: var(--rz-gray-50);
    cursor: pointer;
    transition: all 0.15s;
}

.file-input-wrapper input[type="file"]:hover {
    border-color: var(--rz-primary);
    background: var(--rz-primary-lighter);
}

.file-input-wrapper input[type="file"]::file-selector-button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    background: var(--rz-primary);
    color: white;
    font-weight: 500;
    cursor: pointer;
    margin-right: 0.75rem;
    transition: background 0.15s;
}

.file-input-wrapper input[type="file"]::file-selector-button:hover {
    background: var(--rz-primary-dark);
}

.file-hint {
    display: block;
    font-size: 0.7rem;
    color: var(--rz-gray-500);
    margin-top: 0.5rem;
}

.uploading-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--rz-primary-lighter);
    border-radius: 8px;
    margin-top: 0.75rem;
}

.uploading-indicator span {
    font-size: 0.85rem;
    color: var(--rz-primary);
    font-weight: 500;
}

/* Selected File Info */
.selected-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--rz-success-lighter);
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid var(--rz-success-light);
}

.selected-file-info .rzi {
    color: var(--rz-success);
    font-size: 1.1rem;
}

.selected-file-info .file-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ns-heading);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file-info .file-size {
    font-size: 0.75rem;
    color: var(--rz-gray-500);
    flex-shrink: 0;
}

/* Upload Dialog Footer */
.upload-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--rz-gray-100);
    background: var(--rz-gray-50);
    border-radius: 0 0 12px 12px;
}

/* ========================================
   CONTRACT MANAGEMENT
   ======================================== */

.contract-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.contract-card .card-header h3 {
    flex: 1;
    min-width: 150px;
}

.contract-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

/* Form Row for dialogs */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 1rem;
    }

    .contract-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}

/* Vacation Card Styles */
.vacations-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.vacations-card .card-header h3 {
    flex: 1;
    min-width: 100px;
}

.vacation-summary {
    margin-left: auto;
    margin-right: 1rem;
}

.vacation-pending {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rz-primary);
    background: var(--rz-primary-lighter);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.empty-vacations {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--rz-gray-400);
}

.empty-vacations .rzi {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-vacations p {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 0.25rem;
    color: var(--rz-gray-600);
}

.empty-vacations span {
    font-size: 0.75rem;
}

.vacation-periods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.vacation-period {
    padding: 1rem;
    border-radius: 8px;
    background: var(--rz-gray-50);
    border-left: 4px solid var(--rz-primary);
    cursor: pointer;
    transition: all 0.15s;
}

.vacation-period:hover {
    background: var(--rz-gray-100);
    transform: translateX(2px);
}

.vacation-period.status-active {
    border-left-color: var(--rz-primary);
}

.vacation-period.status-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.vacation-period.status-complete {
    border-left-color: var(--rz-gray-300);
    opacity: 0.7;
}

.period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.period-number {
    font-weight: 600;
    color: var(--ns-heading);
    font-size: 0.9rem;
}

.period-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
}

.vacation-period.status-warning .period-status {
    background: #fef3c7;
    color: #d97706;
}

.vacation-period.status-complete .period-status {
    background: var(--rz-gray-200);
    color: var(--rz-gray-600);
}

.period-dates {
    font-size: 0.8rem;
    color: var(--rz-gray-500);
    margin-bottom: 0.75rem;
}

.period-days {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.days-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.days-label {
    color: var(--rz-gray-500);
}

.days-value {
    font-weight: 500;
    color: var(--rz-gray-700);
}

.days-row.pending .days-value {
    color: var(--rz-primary);
    font-weight: 600;
}

.period-expires {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rz-gray-200);
    font-size: 0.75rem;
    color: var(--rz-gray-500);
}

.period-expires.expiring-soon {
    color: #d97706;
    font-weight: 600;
}

/* Vacation Dialog */
.vacation-dialog {
    max-width: 480px;
}

.vacation-period-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--rz-gray-50);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.vacation-period-info .period-label {
    font-weight: 600;
    color: var(--ns-heading);
}

.vacation-period-info .period-dates {
    font-size: 0.8rem;
    color: var(--rz-gray-500);
    margin-bottom: 0;
}

.vacation-summary-box {
    background: var(--rz-gray-50);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.vacation-summary-box .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
}

.vacation-summary-box .summary-row span {
    font-size: 0.85rem;
    color: var(--rz-gray-600);
}

.vacation-summary-box .summary-row strong {
    font-size: 0.9rem;
}

.text-success {
    color: #059669 !important;
}

.text-muted {
    color: var(--rz-gray-400) !important;
}

.field-hint {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--rz-gray-400);
    font-style: italic;
}

/* Vacation period actions */
.period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.period-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.period-delete-btn {
    background: transparent;
    border: none;
    color: var(--rz-gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.period-delete-btn:hover {
    background: var(--ns-danger-bg);
    color: var(--rz-danger);
}

.period-delete-btn .rzi {
    font-size: 1rem;
}

.period-content {
    cursor: pointer;
}

.period-number {
    cursor: pointer;
}

/* ========================================
   VACATION - CURRENT PERIOD DISPLAY
   ======================================== */

.vacation-current-period {
    padding: 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--rz-primary-lighter) 0%, #e0e7ff 100%);
    border: 1px solid var(--rz-primary-light);
    cursor: pointer;
    transition: all 0.2s;
}

.vacation-current-period:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.current-period-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.current-period-header .period-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--rz-primary);
}

.period-number-badge {
    background: var(--rz-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.current-period-dates {
    font-size: 0.85rem;
    color: var(--rz-gray-600);
    margin-bottom: 0.75rem;
}

.current-period-stats {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.current-period-stats .stat {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
}

.current-period-stats .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ns-heading);
    line-height: 1.2;
}

.current-period-stats .stat-label {
    display: block;
    font-size: 0.65rem;
    color: var(--rz-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.15rem;
}

.current-period-stats .stat.highlight {
    background: var(--rz-primary);
}

.current-period-stats .stat.highlight .stat-value {
    color: white;
}

.current-period-stats .stat.highlight .stat-label {
    color: rgba(255, 255, 255, 0.85);
}

/* View All Periods Button */
.view-all-periods-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: var(--rz-gray-50);
    border: 1px solid var(--rz-gray-200);
    border-radius: 8px;
    color: var(--rz-gray-600);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.view-all-periods-btn:hover {
    background: var(--rz-gray-100);
    color: var(--rz-primary);
    border-color: var(--rz-primary-light);
}

.view-all-periods-btn .rzi {
    font-size: 1.1rem;
}

/* ========================================
   TIME OFF REQUESTS SECTION
   ======================================== */

.time-off-requests-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rz-gray-200);
}

.requests-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rz-gray-600);
    margin-bottom: 0.75rem;
}

.requests-header .rzi {
    font-size: 1rem;
    color: var(--rz-primary);
}

.requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.request-item {
    padding: 0.625rem 0.75rem;
    background: var(--rz-gray-50);
    border-radius: 8px;
    border-left: 3px solid var(--rz-gray-300);
    transition: all 0.15s;
}

.request-item:hover {
    background: var(--rz-gray-100);
}

.request-item.approved {
    border-left-color: var(--rz-success);
    background: var(--ns-success-bg);
}

.request-item.pending {
    border-left-color: var(--rz-warning);
    background: var(--ns-warning-bg);
}

.request-item.rejected {
    border-left-color: var(--rz-danger);
    background: rgba(220, 38, 38, 0.05);
}

.request-item.cancelled {
    border-left-color: var(--rz-gray-400);
    opacity: 0.7;
}

.request-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.request-type .type-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ns-heading);
}

.request-status {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.request-status.approved {
    background: var(--rz-success);
    color: white;
}

.request-status.pending {
    background: var(--rz-warning);
    color: var(--rz-gray-800);
}

.request-status.rejected {
    background: var(--rz-danger);
    color: white;
}

.request-status.cancelled {
    background: var(--rz-gray-400);
    color: white;
}

.request-dates {
    font-size: 0.75rem;
    color: var(--rz-gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.request-days {
    color: var(--rz-gray-500);
    font-size: 0.7rem;
}

.view-more-requests {
    text-align: center;
    padding: 0.5rem;
    font-size: 0.75rem;
    color: var(--rz-primary);
    cursor: pointer;
}

.view-more-requests:hover {
    text-decoration: underline;
}

.request-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--rz-gray-200);
}

.request-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--rz-gray-100);
    color: var(--rz-gray-600);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.request-action-btn .rzi {
    font-size: 0.9rem;
}

.request-action-btn:hover {
    transform: scale(1.05);
}

.request-action-btn.approve {
    background: var(--ns-success-bg);
    color: var(--rz-success);
}

.request-action-btn.approve:hover {
    background: var(--rz-success);
    color: white;
}

.request-action-btn.reject {
    background: var(--ns-warning-bg);
    color: var(--rz-warning);
}

.request-action-btn.reject:hover {
    background: var(--rz-warning);
    color: white;
}

.request-action-btn.delete {
    background: rgba(220, 38, 38, 0.1);
    color: var(--rz-danger);
}

.request-action-btn.delete:hover {
    background: var(--rz-danger);
    color: white;
}

/* ========================================
   ALL PERIODS DIALOG
   ======================================== */

.all-periods-dialog {
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.all-periods-dialog .upload-dialog-header {
    flex-shrink: 0;
}

.dialog-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--rz-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.dialog-close-btn:hover {
    background: var(--rz-gray-100);
    color: var(--rz-gray-700);
}

.all-periods-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.all-periods-summary {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--rz-gray-50);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.all-periods-summary .summary-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
}

.all-periods-summary .summary-item.highlight {
    background: var(--rz-primary);
    border-radius: 8px;
}

.all-periods-summary .summary-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ns-heading);
    line-height: 1.2;
}

.all-periods-summary .summary-item.highlight .summary-value {
    color: white;
}

.all-periods-summary .summary-label {
    display: block;
    font-size: 0.65rem;
    color: var(--rz-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 0.25rem;
}

.all-periods-summary .summary-item.highlight .summary-label {
    color: rgba(255, 255, 255, 0.85);
}

.all-periods-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.period-list-item {
    padding: 1rem;
    border-radius: 8px;
    background: var(--rz-gray-50);
    border-left: 4px solid var(--rz-primary);
    transition: all 0.15s;
}

.period-list-item:hover {
    background: var(--rz-gray-100);
}

.period-list-item.status-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.period-list-item.status-complete {
    border-left-color: var(--rz-gray-300);
    opacity: 0.8;
}

.period-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.period-list-number {
    font-weight: 600;
    color: var(--ns-heading);
    font-size: 0.9rem;
}

.period-list-status {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
}

.period-list-item.status-warning .period-list-status {
    background: #fef3c7;
    color: #d97706;
}

.period-list-item.status-complete .period-list-status {
    background: var(--rz-gray-200);
    color: var(--rz-gray-600);
}

.period-list-dates {
    font-size: 0.8rem;
    color: var(--rz-gray-500);
    margin-bottom: 0.5rem;
}

.period-list-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.period-list-stats span {
    color: var(--rz-gray-600);
}

.period-list-stats strong {
    color: var(--ns-heading);
}

.period-list-stats .pending strong {
    color: var(--rz-primary);
}

.period-list-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rz-gray-200);
}

/* Expired periods */
.period-list-item.status-expired {
    border-left-color: var(--rz-danger);
    background: #fef2f2;
    opacity: 0.7;
}

.period-list-item.status-expired .period-list-status {
    background: #fee2e2;
    color: var(--rz-danger);
}

.period-list-item.status-expired .period-list-number,
.period-list-item.status-expired .period-list-stats .pending strong {
    text-decoration: line-through;
    color: var(--rz-gray-400);
}

/* Current period */
.period-list-item.status-current {
    border-left-color: var(--rz-primary);
    background: var(--rz-primary-lighter);
}

.period-list-item.status-current .period-list-status {
    background: var(--rz-primary);
    color: white;
}

/* Expiration date in stats */
.period-list-stats .expires {
    margin-left: auto;
    font-size: 0.75rem;
}

.period-list-stats .expires.expired {
    color: var(--rz-danger);
}

.period-list-stats .expires.warning {
    color: #d97706;
}

/* Summary expired item */
.all-periods-summary .summary-item.expired {
    background: #fee2e2;
    border-radius: 8px;
}

.all-periods-summary .summary-item.expired .summary-value {
    color: var(--rz-danger);
}

.all-periods-summary .summary-item.expired .summary-label {
    color: #991b1b;
}

/* Read-only value display */
.readonly-value {
    padding: 0.65rem 1rem;
    background: var(--rz-gray-100);
    border: 1px solid var(--rz-gray-200);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--rz-gray-700);
}
