/* -------------------------------------------------------------
 * Akreditasyon Takip Sistemi CSS Tasarım Sistemi
 * Stil Dosyası: Modern, Karanlık Tema Ağırlıklı Premium Tasarım
 * ------------------------------------------------------------- */

/* Temel Ayarlar ve Değişkenler */
:root {
    --bg-main: #0c0808; /* Warmer Göztepe rich dark background */
    --bg-surface: rgba(22, 16, 16, 0.78); /* Semi-transparent warm surface */
    --bg-surface-opaque: #161010;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.14);
    
    --primary: #ef4444; /* Göztepe Red */
    --primary-hover: #dc2626;
    --primary-glow: rgba(239, 68, 68, 0.18);
    
    --success: #22c55e;
    --success-hover: #16a34a;
    --success-glow: rgba(34, 197, 94, 0.15);
    
    --warning: #f59e0b; /* Göztepe Yellow / Amber */
    --warning-hover: #d97706;
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* Genel Sınıflar ve Resetler */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Ortak Yapı (Layout) */
.header-container, .app-main, .footer-container {
    max-width: 1650px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.app-main {
    flex: 1;
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

/* Header Tasarımı (Glassmorphism) */
.app-header {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    color: white;
    font-size: 1.2rem;
}

.app-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.app-nav a {
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-nav li:hover a, .app-nav li.active a {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.app-nav li.active a {
    border-bottom: 2px solid var(--primary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: rgba(239, 68, 68, 0.06);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.user-info .username {
    font-weight: 600;
    font-size: 0.95rem;
}

.user-info .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-logout {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* Sayfa Başlıkları */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #a8b2c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-normal);
    font-size: 0.95rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
}

.btn-success {
    background-color: var(--success);
    color: white;
    box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.btn-xs {
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Kart Tasarımları */
.card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* İstatistik Kartları */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-blue { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.icon-green { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.icon-purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.icon-yellow { background: rgba(234, 179, 8, 0.1); color: var(--warning); }
.icon-red { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Maç Kartları Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.match-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    height: 335px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
}

.match-card.completed {
    background: rgba(20, 28, 47, 0.3);
    border-color: rgba(255, 255, 255, 0.03);
}

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

.match-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-active { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.status-completed { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }

.match-actions {
    display: flex;
    gap: 6px;
}

.action-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.text-success:hover { color: var(--success); }
.text-danger:hover { color: var(--danger); }
.text-warning:hover { color: var(--warning); }

.match-card-body {
    padding: 20px;
    flex: 1;
}

.match-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.match-progress-container {
    padding: 0 20px 16px;
}

.progress-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--success));
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.progress-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-top: 4px;
    color: var(--text-muted);
}

.match-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* Breadcrumbs */
.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a:hover {
    color: var(--text-primary);
}

/* Tablolar */
.table-card {
    border-radius: var(--radius-md);
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.data-table th, .data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid rgba(255, 255, 255, 0.07); /* Thin vertical borders */
    vertical-align: middle;
}

.data-table th:last-child, .data-table td:last-child {
    border-right: none;
}

.data-table th {
    background: rgba(255, 255, 255, 0.01);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative; /* Position relative for resizer handle */
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr.row-constant {
    background: rgba(234, 179, 8, 0.015);
}

.data-table tbody tr.row-constant:hover {
    background: rgba(234, 179, 8, 0.03);
}

/* Badges / Rozetler */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.badge-active { background: rgba(99, 102, 241, 0.15); color: var(--primary); }
.badge-completed { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }
.badge-company { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.badge-constant { background: rgba(234, 179, 8, 0.12); color: #fef08a; }
.badge-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-pending { background: rgba(100, 116, 139, 0.15); color: var(--text-secondary); }
.badge-superadmin { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.badge-admin { background: rgba(59, 130, 246, 0.12); color: #93c5fd; }
.badge-current { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); border: 1px solid var(--border-color); }

.ml-2 { margin-left: 8px; }
.mt-5 { margin-top: 3rem; }

/* File link & actions style */
.file-link-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.08);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.file-link:hover {
    background: var(--primary);
    color: white;
}

.file-link.text-pdf {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.15);
}

.file-link.text-pdf:hover {
    background: var(--danger);
    color: white;
}

.icon-btn-inline {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition-fast);
    padding: 4px;
}

.icon-btn-inline:hover {
    color: var(--text-primary);
}

.icon-btn-inline.text-success {
    color: var(--success);
}

.icon-btn-inline.text-success:hover {
    color: var(--success-hover);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 580px;
    max-width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content.modal-sm {
    width: 420px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    font-size: 1.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Tasarımları */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-checkbox {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-group-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-row {
    display: flex;
    gap: 16px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-normal);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: rgba(255, 255, 255, 0.05);
}

/* File Upload Drag Drop Area */
.file-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    transition: var(--transition-normal);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
}

.file-drop-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}

.file-drop-area i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.fake-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.file-msg {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alert Boxes / Bildirimler */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    border-left: 4px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    border-left-color: var(--danger);
}

.alert-success {
    background: rgba(34, 197, 94, 0.08);
    color: #4ade80;
    border-left-color: var(--success);
}

/* Giriş Ekranı (Login Page Specific) */
.login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.login-glow-1 {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.15) 0%, transparent 70%);
    top: 20%;
    left: 20%;
    z-index: 1;
}

.login-glow-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
    bottom: 20%;
    right: 20%;
    z-index: 1;
}

.login-card {
    background: rgba(20, 28, 47, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 440px;
    padding: 40px;
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input {
    padding-left: 45px;
}

/* User management specific avatar */
.user-row-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* Stats view Layout */
.stats-charts-row {
    display: flex;
    gap: 24px;
    margin-bottom: 2.5rem;
}

.chart-card {
    height: 380px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 20px;
    height: calc(100% - 60px);
}

.chart-container-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.table-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.table-progress-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.table-progress-fill {
    height: 100%;
    background: var(--success);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    background: rgba(20, 28, 47, 0.2);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}

.empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-table-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 12px;
}

.empty-table-state i {
    font-size: 2.5rem;
}

/* Footer */
.app-footer {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: auto;
    background: rgba(11, 15, 25, 0.5);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-charts-row {
        flex-direction: column;
    }
    .chart-card {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }
    .app-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .header-actions .btn {
        width: 100%;
    }
}

/* Custom Checkbox Design (Spreadsheet Style) */
.checkbox-container {
    display: inline-block;
    position: relative;
    width: 22px;
    height: 22px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.08);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.label-check {
    padding-left: 32px;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    position: relative;
    width: auto;
    height: auto;
}

.label-check .checkmark {
    left: 0;
}

.label-text {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Printed Row Highlight style */
.printed-row-highlight {
    background-color: rgba(34, 197, 94, 0.04) !important;
}

.printed-row-highlight:hover {
    background-color: rgba(34, 197, 94, 0.07) !important;
}

/* File links layout */
.file-links-vertical {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-link-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.file-link-inline:hover {
    text-decoration: underline;
}

.file-link-inline.text-pdf {
    color: #f87171;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    padding: 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.text-btn:hover {
    color: var(--text-primary);
}

.text-btn.text-pdf {
    color: #f87171;
}

.text-btn.text-pdf:hover {
    color: #ef4444;
}

/* Toast Notification Styles */
#toast-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast-msg {
    background: rgba(20, 28, 47, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-msg.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    border-left: 4px solid var(--success);
    color: #4ade80;
}

.toast-danger {
    border-left: 4px solid var(--danger);
    color: #f87171;
}

.toast-warning {
    border-left: 4px solid var(--warning);
    color: #facc15;
}

.badge-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.badge-outline-blue {
    background: transparent;
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.row-type-indicator {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.block {
    display: block;
}

/* Clickable match card redirect */
.match-card-body, .match-title {
    cursor: pointer;
}

.match-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Inline Sheet Spreadsheet Styles */
.inline-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 5px 2px;
    text-align: center;
    border-radius: 4px;
    width: 100%;
    min-width: 32px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.inline-input:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.02);
}

.inline-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(20, 28, 47, 0.9);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.inline-input.notes-input {
    width: 100%;
    min-width: 90px;
    text-align: left;
}

.inline-select {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 5px 2px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-align-last: center; /* Center options */
    cursor: pointer;
    width: 100%;
    min-width: 70px;
    transition: var(--transition-fast);
}

.inline-select:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.02);
}

select option {
    background-color: #161010 !important;
    color: #ffffff !important;
}

.inline-select:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(20, 28, 47, 0.9);
}

.inline-select option {
    background-color: var(--bg-surface-opaque);
    color: var(--text-primary);
}

/* Adjust table sizing for input compatibility */
.data-table td {
    padding: 5px 6px; /* reduced padding for inline excel layout */
}

.bottom-save-actions {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
}

/* Completed locked row styles */
.row-completed-locked {
    background-color: rgba(34, 197, 94, 0.04) !important;
}

.row-completed-locked strong {
    color: #22c55e !important; /* Rich green text */
    font-weight: 700;
    text-shadow: 0 0 10px rgba(34, 197, 94, 0.25); /* Glowing green name */
}

.row-completed-locked input,
.row-completed-locked select {
    opacity: 0.5;
    cursor: not-allowed;
}

.row-completed-locked .checkbox-container {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status buttons styling for row actions */
.status-btn {
    border-radius: 6px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
}

.btn-completed {
    background-color: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #4ade80;
    white-space: nowrap; /* Keep completed as single line since it is short */
}

.btn-completed:hover {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}



.btn-mark-complete {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    max-width: 105px;
    display: inline-block;
}

.btn-mark-complete:hover {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ade80;
}

/* Static Badges for Completed Matches */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-completed {
    background-color: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #4ade80;
}

.badge-pending {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.company-name-cell {
    white-space: nowrap;
    min-width: 170px;
}

/* Compact spacing helper columns for spreadsheet */
.col-checkbox {
    width: 75px;
    min-width: 75px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
}

.col-number {
    width: 65px;
    min-width: 65px;
    padding-left: 4px;
    padding-right: 4px;
    text-align: center;
}

.col-notes {
    width: 60px;
    min-width: 60px;
    text-align: center;
    padding-left: 2px;
    padding-right: 2px;
}

/* Excel Resizable Columns Handle */
.col-resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
    background: transparent;
    transition: background-color 0.2s;
}

.col-resize-handle:hover,
.col-resize-handle.resizing {
    background-color: var(--primary) !important;
}

/* Sort dropdown control */
.sort-control-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.sort-select {
    background: rgba(22, 16, 16, 0.95); /* Darker background to prevent browser styling issues */
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition-fast);
}

.sort-select option {
    background-color: #1e293b; /* Dark slate background */
    color: #ffffff; /* White text for visibility */
}

.sort-select:hover {
    border-color: var(--border-color-hover);
    background: rgba(30, 41, 59, 0.9);
}

.sort-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Interactive Notes Log Styling */
.notes-bubble-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: var(--transition-fast);
}

.notes-bubble-btn:hover {
    transform: scale(1.15);
}

.notes-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.15rem;
    position: relative;
}

.notes-indicator.empty {
    color: var(--text-muted);
}

.notes-indicator.empty:hover {
    color: var(--primary);
}

.notes-indicator.active {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.notes-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: 1px solid var(--bg-surface);
}

/* Chat bubble log panel */
.notes-list-container {
    max-height: 320px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.note-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: var(--transition-fast);
}

.note-bubble:hover {
    background: rgba(255, 255, 255, 0.04);
}

.note-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 4px;
}

.note-username {
    font-weight: 700;
    color: var(--text-secondary);
}

.note-username i {
    margin-right: 4px;
    font-size: 0.8rem;
}

.note-time {
    font-weight: 500;
}

.note-body {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

/* Summary Report Modal Grid & Layout Styles */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-box {
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: var(--transition-fast);
}

.summary-box:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color-hover);
}

.summary-box-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-box-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-progress-wrapper {
    margin-bottom: 24px;
    padding: 18px;
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-md);
}

.summary-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--warning), var(--primary));
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Custom Checkbox Design for Accreditation Table */
.data-table input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    outline: none;
    background-color: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.data-table input[type="checkbox"]:hover {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.data-table input[type="checkbox"]:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

/* Checked States (All 3 Checkboxes: Liste, Akr., Basım are Green) */
.data-table td:nth-child(7) input[type="checkbox"]:checked,
.data-table td:nth-child(8) input[type="checkbox"]:checked,
.data-table td:nth-child(9) input[type="checkbox"]:checked {
    background-color: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

/* Checkmark Tick Icon */
.data-table input[type="checkbox"]:checked::after {
    content: '✔';
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: bold;
    display: block;
}

/* Disabled/Locked state checkbox */
.data-table input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(0, 0, 0, 0.15) !important;
}

/* Utility Classes for Alignment */
.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

/* Ensure checkbox and note buttons are centered horizontally */
.data-table td.text-center {
    text-align: center;
    vertical-align: middle;
}

.data-table td.text-center > * {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Row Ordering Actions (Miniature & Subtle Hover Fade-in) */
.row-order-actions {
    opacity: 0 !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    gap: 4px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px;
    margin-left: 8px;
}

.spreadsheet-row:hover .row-order-actions {
    opacity: 0.6 !important;
}

.row-order-actions:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.07);
}

.row-order-btn {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    font-size: 0.62rem !important; /* Extremely small and elegant */
    padding: 2px 4px !important;
    border-radius: 3px !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

.row-order-btn:hover {
    color: var(--primary) !important; /* Göztepe Red/Yellow highlight */
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Firma Portalı Mobil Uyumluluk Optimizasyonları */
@media (max-width: 600px) {
    .company-coord-row {
        grid-template-columns: 1fr !important;
    }
    .stats-overview {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .app-main {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        padding-top: 1.5rem !important;
    }
    .card {
        padding: 16px !important;
    }
    
    /* Mobil Personnel Tablosu Optimizasyonu */
    #companyPersonnelTable {
        table-layout: fixed !important;
        width: 100% !important;
    }
    #companyPersonnelTable th, 
    #companyPersonnelTable td {
        padding: 6px 4px !important;
        font-size: 0.72rem !important;
    }
    #companyPersonnelTable .inline-input {
        font-size: 0.75rem !important;
        padding: 5px 3px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }
    #companyPersonnelTable th {
        font-size: 0.7rem !important;
        font-weight: 700 !important;
    }
}

/* -------------------------------------------------------------
 * PDKS Arayüz ve Animasyon Stilleri
 * ------------------------------------------------------------- */
.qr-glowing-wrapper {
    animation: qr-glow-pulse 4s infinite alternate;
}

@keyframes qr-glow-pulse {
    0% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.25);
    }
    100% {
        box-shadow: 0 0 45px rgba(239, 68, 68, 0.35);
        border-color: rgba(239, 68, 68, 0.45);
    }
}

/* PDKS Durum Rozetleri */
.badge-pdks-inside {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    padding: 3px 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pdks-outside {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    padding: 3px 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-pdks-absent {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    padding: 3px 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
