/**
 * HYP Modern CSS
 * Temiz, modern ve responsive tasarım
 */

:root {
    /* Renk Paleti */
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --success-dark: #166534;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: var(--spacing-lg);
}

/* Container */
.hyp-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
.hyp-header {
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    color: white;
    padding: var(--spacing-xl);
    text-align: center;
}

.hyp-header h1 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.hyp-header p {
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

/* Form Section */
.hyp-form-section {
    padding: var(--spacing-xl);
}

.section-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-color);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table/* Table */
.hyp-table-wrapper {
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.hyp-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.hyp-table thead {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
}

.hyp-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hyp-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.hyp-table tbody tr:hover {
    background-color: #f0f9ff;
}

.hyp-table td {
    padding: var(--spacing-md);
}

/* Input Alanları - Modern ve Okunabilir */
.table-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e0f2fe;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    background: #f0f9ff;
    color: #1e293b;
    transition: all 0.3s ease;
}

.table-input:hover {
    border-color: #bae6fd;
    background: #e0f2fe;
}

.table-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

/* Hücre Renklendirmesi - TÜM HÜCRE RENKLENIR */
.cell-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    font-weight: 600;
}

.cell-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: 600;
}

.cell-success-dark {
    background-color: #6ee7b7 !important;
    color: #064e3b !important;
    font-weight: 700;
}

.cell-dark {
    background-color: #1e293b !important;
    color: white !important;
    font-weight: 700;
}

/* Katsayı Hücresi */
.hyp-table td:nth-child(7) {
    font-weight: 700;
    color: #1e40af;
    font-size: 1.05rem;
}

.result-value {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
}

/* Color Classes */
.text-bg-success {
    background-color: var(--success-color);
    color: white;
}

.text-bg-success-dark {
    background-color: var(--success-dark);
    color: white;
}

.text-bg-danger {
    background-color: var(--danger-color);
    color: white;
}

.text-bg-dark {
    background-color: var(--dark-color);
    color: white;
}

.text-bg-warning {
    background-color: var(--warning-color);
    color: white;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.summary-card-title {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    margin-bottom: var(--spacing-sm);
}

.summary-card-value {
    font-size: 2rem;
    font-weight: 700;
}

/* Maaş Katsayı Card'ı için özel arka planlar */
.summary-card.maas-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.summary-card.maas-success .maas-katsayi-success {
    color: white !important;
    /* Yeşil arka planda beyaz yazı */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.summary-card.maas-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: cardPulse 2s ease-in-out infinite;
}

.summary-card.maas-danger .maas-katsayi-danger {
    color: white !important;
    /* Kırmızı arka planda beyaz yazı */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes cardPulse {

    0%,
    100% {
        box-shadow: var(--shadow-md);
    }

    50% {
        box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
    }
}

/* Maaş Katsayı Özel Stiller */
.maas-katsayi-success {
    color: #1e293b !important;
    /* Siyah */
    font-weight: 700;
    font-size: 2rem;
    display: inline-block;
    cursor: help;
}

.maas-katsayi-danger {
    color: #ef4444 !important;
    /* Kırmızı */
    font-weight: 700;
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: heartBeat 1.5s ease-in-out infinite;
    cursor: help;
}

.maas-katsayi-danger i {
    font-size: 1.8rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    10%,
    30% {
        transform: scale(1.05);
    }

    20%,
    40% {
        transform: scale(1);
    }
}

/* Loader */
#loader {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Status Bar - Zarif bildirim alanı */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 999;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.status-bar.status-calculating {
    background: linear-gradient(135deg, var(--info-color), var(--primary-color));
    color: white;
    transform: translateY(0);
}

.status-bar.status-success {
    background: linear-gradient(135deg, var(--success-color), #16a34a);
    color: white;
    transform: translateY(0);
}

.status-bar.status-error {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    transform: translateY(0);
}

.status-bar.status-fade {
    opacity: 0;
    transform: translateY(-100%);
}

.status-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-message::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Success Flash Effect */
.success-flash {
    animation: successFlash 0.6s ease;
}

@keyframes successFlash {

    0%,
    100% {
        box-shadow: var(--shadow-lg);
    }

    50% {
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
        transform: scale(1.002);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .hyp-container {
        margin: var(--spacing-sm);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .hyp-table {
        font-size: var(--font-size-sm);
    }

    .hyp-table th,
    .hyp-table td {
        padding: var(--spacing-sm);
    }

    /* Mobilde input'lar için özel ayar */
    .table-input {
        font-size: 0.9rem;
        padding: 0.4rem;
    }

    /* Mobilde hücre renkleri daha belirgin */
    .cell-danger,
    .cell-success,
    .cell-success-dark,
    .cell-dark {
        font-size: 0.85rem;
        padding: 0.3rem;
    }

    /* Status bar mobil optimizasyonu */
    .status-bar {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .status-message::before {
        width: 6px;
        height: 6px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .hyp-container {
        box-shadow: none;
    }

    .no-print {
        display: none !important;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.fw-bold {
    font-weight: 700;
}

.fw-normal {
    font-weight: 400;
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

/* Tarama Kalan Gösterimi */
.kalan-tarama {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* Success Checkmark */
.check-icon {
    color: var(--success-color);
    font-size: 1.5rem;
}