/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.logo i {
    color: #3498db;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    color: white;
}

.user-info span {
    font-weight: 500;
}

.user-info button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Şifre değiştirme modalı için özel stiller */
#changePasswordModal .modal-content {
    max-width: 450px;
}

#changePasswordModal .form-group {
    margin-bottom: 1.2rem;
}

#changePasswordModal .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

#changePasswordModal .form-group input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#changePasswordModal .form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#passwordError {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.nav-link {
    color: #bdc3c7;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

/* Main Content */
.main {
    padding: 1.5rem 0;
}

.admin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.admin-header h1 i {
    color: #3498db;
}

.admin-header p {
    font-size: 1.1rem;
    color: #64748b;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.stat-info p {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Admin Sections */
.admin-sections {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    .admin-sections {
        grid-template-columns: 1fr;
    }
}

.section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.section-header h2 i {
    color: #3498db;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

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

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

/* Table */
.programs-table {
    overflow-x: auto;
    margin-top: 0.75rem;
    min-width: 900px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    table-layout: fixed;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.8rem;
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

th:first-child {
    width: 25%;
    min-width: 200px;
}

th:nth-child(2) {
    width: 20%;
    min-width: 150px;
    text-align: center;
}

th:nth-child(3) {
    width: 10%;
    min-width: 80px;
    text-align: center;
}

th:nth-child(4) {
    width: 10%;
    min-width: 80px;
    text-align: center;
}

th:nth-child(5) {
    width: 10%;
    min-width: 80px;
    text-align: center;
}

th:nth-child(6) {
    width: 15%;
    min-width: 120px;
    text-align: right;
}

td {
    color: #64748b;
    font-size: 0.8rem;
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Program name column */
td:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0;
    font-weight: 500;
    position: relative;
    cursor: help;
    text-align: left;
}

/* Tooltip for full program name on hover */
td:first-child:hover::after {
    content: attr(title);
    position: absolute;
    top: -2rem;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    max-width: 300px;
}

/* Category column */
td:nth-child(2) {
    font-size: 0.75rem;
    white-space: normal;
    text-align: center;
    padding: 0.75rem 0.5rem;
    max-width: 150px;
}

/* Size column */
td:nth-child(3) {
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: center;
    padding: 0.75rem 0.5rem;
}

/* Download count column */
td:nth-child(4) {
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: center;
    padding: 0.75rem 0.5rem;
}

/* Status column */
td:nth-child(5) {
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: center;
    padding: 0.75rem 0.5rem;
}

/* Actions column */
td:nth-child(6) {
    text-align: right;
    padding: 0.75rem 0.5rem;
}

tr:hover {
    background: #f8fafc;
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    min-width: 60px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Category Management */
.category-management {
    display: grid;
    gap: 2rem;
}

.category-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

/* Table select dropdowns */
table select {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

table select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

table select option {
    padding: 0.5rem;
    font-size: 0.75rem;
}

.categories-list {
    display: grid;
    gap: 1rem;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

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

.category-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-name {
    font-weight: 500;
    color: #2c3e50;
}

.category-actions {
    display: flex;
    gap: 0.4rem;
}

/* Action Button Groups */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.action-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    min-width: 60px;
}

/* Compact utility classes */
.compact-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    align-items: end;
}

.compact-section {
    margin-bottom: 1.5rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #2c3e50;
}

.modal-body {
    padding: 1.2rem;
}

.file-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    font-family: monospace;
    color: #475569;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 1.2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .admin-header {
        margin-bottom: 1.5rem;
    }
    
    .admin-header h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .category-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        margin-bottom: 1rem;
    }
    
    .programs-table {
        font-size: 0.8rem;
        min-width: 700px;
    }
    
    th, td {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
    }
    
    /* Mobile layout adjustments */
    td:first-child {
        max-width: 150px;
        min-width: 120px;
    }
    
    td:nth-child(2) {
        font-size: 0.7rem;
        max-width: 100px;
        min-width: 80px;
        padding: 0.5rem 0.3rem;
    }
    
    td:nth-child(3) {
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    td:nth-child(4) {
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    td:nth-child(5) {
        font-size: 0.7rem;
        min-width: 60px;
    }
    
    .action-buttons {
        gap: 0.3rem;
        justify-content: flex-end;
    }
    
    .action-buttons .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        min-width: 50px;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .user-info button {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
} 