/* 
  style.css (Tam Premium Sürüm - Tüm Stiller)
*/
:root {
    --primary: #0056b3;
    --primary-hover: #004494;
    --text-color: #333;
    --bg-light: #f8f9fa;
    --success: #16a34a;
    --error: #dc3545;
    --loading: #2563eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    height: 100vh;
    line-height: 1.6;
}

/* ===== LOGIN VIEW ===== */
.login-view {
    display: flex;
    width: 100%;
    height: 100vh;
}

.login-left {
    flex: 6;
    background: url('favicon.png') no-repeat center center;
    background-size: cover;
    position: relative;
}

.login-left::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.3);
}

.login-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(20deg, rgba(0, 86, 179, 0.3) 0%, transparent 100%);
    z-index: 1;
}

.login-right {
    flex: 4;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    text-align: center;
    border-radius: 20px;
    background: white;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-logo {
    max-width: 220px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.auth-subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #334155;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-color);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
    outline: none;
}

/* Placeholder Styling */
input::placeholder,
textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 6px -1px rgba(0, 86, 179, 0.2);
    transition: all 0.3s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 86, 179, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Status Messages */
#login-status {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 1.2rem;
    transition: all 0.3s;
}

.status-loading {
    color: var(--loading);
    animation: pulse 1.5s infinite;
}

.status-success {
    color: var(--success);
}

.status-error {
    color: var(--error);
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* ===== DASHBOARD ===== */
.app-container {
    width: 100%;
    min-height: 100vh;
}

.header-area {
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dashboard-view {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s;
}

/* Panel Info */
.panel-info {
    background: #eff6ff;
    border-left: 5px solid var(--primary);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    color: #1e40af;
    font-weight: 600;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 2px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(0, 86, 179, 0.05);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* Tab Content Cards */
#tab-new-req,
#tab-my-req {
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.4s ease-out;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    align-items: center;
    flex-wrap: wrap;
}

.filter-item {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6c757d;
    margin: 0;
}

.filter-item select,
.filter-item input {
    padding: 10px 14px;
    font-size: 0.9rem;
}

/* ===== USER DROPDOWN ===== */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-info {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s;
}

.user-info:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.user-avatar-placeholder {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 55px;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    z-index: 1000;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content a {
    color: #334155;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background: #f8fafc;
    color: var(--primary);
    padding-left: 20px;
}

.dropdown-content a.logout-link {
    color: #dc3545 !important;
    border-bottom: none !important;
}

.show {
    display: block;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 10px;
}

th {
    text-align: left;
    padding: 15px 20px;
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

td {
    padding: 18px 20px;
    vertical-align: top;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8fbff;
}

/* ===== BADGES & STATUS ===== */
.badge-project {
    display: inline-block;
    background: #343a40;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 4px;
    text-transform: uppercase;
}

.badge-days {
    background: #e7f5ff;
    color: #228be6;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-left: 8px;
}

.badge-req-date {
    font-size: 0.75rem;
    color: #868e96;
    display: block;
    margin-top: 4px;
    font-style: italic;
}

.status {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.st-tl_bekliyor {
    background: #fff3cd;
    color: #856404;
}

.st-spv_bekliyor {
    background: #e2e3e5;
    color: #383d41;
}

.st-ik_bekliyor {
    background: #d1ecf1;
    color: #0c5460;
}

.st-onaylandi {
    background: #d4edda;
    color: #155724;
}

.st-red {
    background: #f8d7da;
    color: #721c24;
}

/* ===== DOCUMENT STATUS BADGES ===== */
.badge-doc {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.badge-doc-success {
    background: #d4edda;
    color: #155724;
}

.badge-doc-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-doc-warning {
    background: #fff3cd;
    color: #856404;
}

.doc-status-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    font-weight: 600;
}

.doc-status-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* ===== ACTION BUTTONS ===== */
.action-btns {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 90px;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
}

.approve {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.approve:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.reject {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.reject:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* === MOBİL UYGULAMA UYUMLULUĞU (PREMIUM APP LOOK) === */
@media (max-width: 768px) {
    body {
        background: #f4f7fa;
    }

    .header-area {
        padding: 5px 15px;
        flex-direction: row;
        /* Logo ve profil yan yana */
        justify-content: space-between;
        gap: 0;
        height: 60px;
    }

    .header-left img {
        height: 28px;
    }

    .header-left h3 {
        display: none;
    }

    /* Yazıyı gizle sadece logo kalsın */

    .user-info {
        padding: 4px 10px;
        border-radius: 30px;
    }

    .user-info span {
        display: none;
    }

    /* Mobilde ismi gizle sadece avatar kalsın */

    .dashboard-view {
        padding: 10px;
    }

    .tabs {
        margin-bottom: 15px;
        border-bottom: none;
        background: #eaeff5;
        padding: 4px;
        border-radius: 12px;
    }

    .tab-btn {
        flex: 1;
        padding: 8px;
        font-size: 0.8rem;
        border-radius: 10px;
    }

    .tab-btn.active {
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .tab-btn.active::after {
        display: none;
    }

    /* Kart Yapısı */
    #tab-new-req,
    #tab-my-req {
        padding: 15px 12px;
        border-radius: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    /* Arama Alanı */
    #tab-my-req>div:first-child>div {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    #search-fullname {
        padding: 10px !important;
        font-size: 14px !important;
    }

    /* TABLOYU KARTLARA DÖNÜŞTÜR (Sadece Admin ve Rapor Tablosu) */
    #admin-table,
    #admin-table thead,
    #admin-table tbody,
    #admin-table th,
    #admin-table td,
    #admin-table tr,
    #rep-table,
    #rep-table thead,
    #rep-table tbody,
    #rep-table th,
    #rep-table td,
    #rep-table tr {
        display: block;
        width: 100%;
        border: none !important;
    }

    #admin-table thead,
    #rep-table thead {
        display: none;
    }

    /* Başlıkları gizle */

    tr {
        background: white;
        margin-bottom: 12px;
        padding: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
        border: 1px solid #edf2f7 !important;
        position: relative;
    }

    td {
        padding: 4px 0 !important;
        font-size: 13px;
        text-align: left;
    }

    /* Spesifik Alan Düzenlemeleri */
    td:nth-child(1) {
        /* Tarih Alanı */
        font-weight: 700;
        color: var(--primary);
        font-size: 14px;
        border-bottom: 1px solid #f1f5f9 !important;
        padding-bottom: 8px !important;
        margin-bottom: 8px;
    }

    td:nth-child(2) {
        /* İzin Türü */
        font-weight: 600;
        color: #1a202c;
    }

    td:nth-child(2)::before {
        content: "📋 Tür: ";
        color: #718096;
        font-weight: 400;
    }

    td:nth-child(3)::before {
        content: "💬 Not: ";
        color: #718096;
        font-weight: 400;
    }

    /* Durum Rozeti (Sağ Üst Köşeye Alalım) */
    td:last-child {
        position: absolute;
        top: 15px;
        right: 15px;
        width: auto;
    }

    /* Form Elemanları */
    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Zoom engelleme */
        padding: 12px !important;
    }

    .btn-primary {
        width: 100%;
        padding: 14px !important;
    }

    /* Onay Butonları Mobilde Alt Alta veya Yan Yana Tam Genişlik */
    .action-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
        margin-top: 10px;
    }

    .action-btn {
        width: 100%;
        min-width: unset;
        font-size: 0.8rem;
    }
}

/* Sayfa Kaydırma Akıcılığı */
* {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
    .header-left img {
        height: 35px;
    }

    .user-avatar-placeholder {
        width: 30px;
        height: 30px;
    }

    .user-info span {
        font-size: 0.8rem;
    }
}

/* ===== PAGINATION ===== */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: #495057;
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-weight: 600;
    color: #495057;
}

/* ===== UTILITIES ===== */
.hidden {
    display: none !important;
}

.animate-fade {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== KULLANICI YÖNETİMİ MODAL ===== */
.mgmt-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}

.mgmt-tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}

.mgmt-tab-btn:hover {
    color: var(--primary);
    background: rgba(0, 86, 179, 0.05);
}

.mgmt-tab-btn.active {
    color: var(--primary);
    background: rgba(0, 86, 179, 0.1);
    border-bottom: 3px solid var(--primary);
}

.mgmt-tab-content {
    animation: fadeIn 0.3s;
    padding: 10px 0;
}

.alert-info {
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #075985;
    font-size: 0.9rem;
}

#user-list-container table {
    font-size: 0.9rem;
}

#user-list-container th {
    background: #f8f9fa;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .login-left {
        display: none;
    }

    .login-right {
        flex: 1;
    }

    .dashboard-view {
        padding: 20px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-item {
        width: 100%;
    }
}

/* === SIGNATURE === */
.signature {
    position: fixed;
    bottom: 12px;
    right: 15px;
    font-size: 0.7rem;
    color: #cbd5e1;
    font-weight: 500;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
    transition: opacity 0.3s;
}

body:hover .signature {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .signature {
        bottom: 8px;
        right: 12px;
        font-size: 0.55rem;
        opacity: 0.2;
        background: transparent;
        backdrop-filter: none;
        padding: 0;
    }
}

/* === APPLE iOS INSTALL PROMPT === */
.ios-prompt {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    z-index: 20000;
    display: none;
    animation: slideUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ios-prompt-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.ios-prompt-header img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.ios-prompt h4 {
    font-weight: 800;
    color: #1a202c;
    margin: 0;
    font-size: 1.2rem;
}

.ios-prompt p {
    font-size: 0.95rem;
    color: #4a5568;
    margin: 5px 0 0 0;
    line-height: 1.5;
}

.ios-prompt-steps {
    margin-top: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

.ios-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1rem;
    color: #2d3748;
}

.ios-step span.icon {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
}

.ios-close-btn {
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    background: #0056b3;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

/* === ANDROID INSTALL BANNER === */
.android-prompt {
    position: fixed;
    top: 20px;
    left: 15px;
    right: 15px;
    background: #2d3436;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 30000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.android-prompt img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.android-prompt-text {
    flex: 1;
}

.android-prompt-text h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.android-prompt-text p {
    margin: 2px 0 0;
    font-size: 0.75rem;
    opacity: 0.8;
}

.android-install-btn {
    background: #0984e3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.android-close-x {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.6;
}
