/* Anket Sistemi - Ana CSS Dosyası */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Container ve Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
}

.header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.header .user-info {
    text-align: right;
    font-size: 0.9rem;
}

/* Navigation */
.nav {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    border-right: 1px solid #e9ecef;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #495057;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: var(--light-color);
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--light-color);
    border-top: 1px solid #e9ecef;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.stats-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stats-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stats-card .label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Survey Form */
.survey-form {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.question-number {
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 1rem;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.question-required {
    color: var(--danger-color);
}

/* Rating Scale */
.rating-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.rating-item {
    text-align: center;
    flex: 1;
}

.rating-item input[type="radio"] {
    display: none;
}

.rating-item label {
    display: block;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.rating-item input[type="radio"]:checked + label {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.rating-item label:hover {
    border-color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.1);
}

/* Location */
.location-info {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.location-status {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.location-status .icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.location-status.success {
    color: var(--success-color);
}

.location-status.error {
    color: var(--danger-color);
}

/* Progress Bar */
.progress {
    background-color: #e9ecef;
    border-radius: 50px;
    height: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary-color);
    height: 100%;
    transition: width 0.3s ease;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .col-6,
    .col-4,
    .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-item {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header .user-info {
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .rating-scale {
        flex-direction: column;
    }
    
    .rating-item {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        margin-right: 0;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .card-body {
        padding: 1rem;
    }
    
    .question-card {
        padding: 1.5rem;
    }
    
    .stats-card {
        padding: 1rem;
    }
    
    .form-control {
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
}

/* =================================================
   ADMIN PANEL SIDEBAR FIX
   ================================================= */

/* Admin Sidebar Container */
.sidebar {
    background: #f8f9fa !important;
    border-right: 2px solid #dee2e6 !important;
    min-height: calc(100vh - 56px) !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
}

/* Sidebar Section Headers */
.sidebar h6 {
    color: #495057 !important;
    background: #e9ecef !important;
    padding: 12px 15px !important;
    margin: 0 0 10px 0 !important;
    border-bottom: 1px solid #dee2e6 !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 0 !important;
}

/* Navigation Links */
.sidebar .nav-link {
    color: #495057 !important;
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    margin: 3px 10px !important;
    padding: 12px 15px !important;
    display: block !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
}

/* Navigation Link Hover */
.sidebar .nav-link:hover {
    background: #e3f2fd !important;
    color: #1976d2 !important;
    border-color: #1976d2 !important;
    transform: translateX(3px) !important;
    text-decoration: none !important;
}

/* Active Navigation Link */
.sidebar .nav-link.active {
    background: #1976d2 !important;
    color: white !important;
    border-color: #1976d2 !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.3) !important;
}

/* Navigation Icons */
.sidebar .nav-link i {
    width: 18px !important;
    margin-right: 8px !important;
    text-align: center !important;
    font-size: 0.9rem !important;
}

/* Navigation Lists */
.sidebar .nav {
    padding: 0 !important;
    margin-bottom: 20px !important;
    list-style: none !important;
}

/* Navigation Items */
.sidebar .nav-item {
    display: block !important;
    margin-bottom: 2px !important;
}

/* Sidebar Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        position: static !important;
        margin-bottom: 20px !important;
        min-height: auto !important;
    }
    
    .sidebar .nav-link {
        margin: 2px 5px !important;
        padding: 10px 12px !important;
    }
}

/* Force Visibility */
.sidebar .nav-item,
.sidebar .nav-link,
.sidebar .nav {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Sidebar Show Class */
.sidebar.show {
    display: block !important;
}

/* Admin Panel Specific */
body.admin-panel .sidebar {
    background: #f8f9fa !important;
}

/* Override Bootstrap defaults */
.sidebar .collapse.show {
    display: block !important;
}

.sidebar .nav-link:focus,
.sidebar .nav-link:active {
    color: #1976d2 !important;
    background: #e3f2fd !important;
    outline: none !important;
}