* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

h2 {
    color: #666;
    margin: 30px 0 20px 0;
    font-size: 1.2em;
}

.anketor-section {
    margin-bottom: 30px;
}

.anketor-section label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.anketor-section input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.anketor-section input:focus {
    outline: none;
    border-color: #4CAF50;
}

.actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #2196F3;
    color: white;
}

.btn-secondary:hover {
    background: #0b7dda;
}

.empty {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

.anket-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.anket-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.anket-info strong {
    color: #333;
    font-size: 1.1em;
}

.anket-info .status {
    font-size: 0.9em;
    color: #666;
}

.anket-info small {
    color: #999;
    font-size: 0.85em;
}

.anket-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background: #f0f0f0;
    color: #333;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: #e0e0e0;
}

.btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

@media (max-width: 768px) {
    .anket-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .anket-actions {
        justify-content: stretch;
    }
    
    .btn-sm {
        flex: 1;
    }
    
    .actions {
        flex-direction: column;
    }
}

.btn-install {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 25px;
  background: #2196F3;
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
}

.ios-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #007AFF;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 14px;
  z-index: 1001;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

/* =============================================
   ANKETÖR BİLGİ GÖSTERİMİ
   ============================================= */

.anketor-info-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.anketor-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.anketor-name {
    font-size: 1.1em;
    font-weight: 600;
}

.anketor-email {
    font-size: 0.9em;
    opacity: 0.9;
}

.btn-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.3);
}

/* =============================================
   ANKETÖR FORMU
   ============================================= */

.anketor-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px dashed #ddd;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-save {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save:hover {
    background: #45a049;
}

/* =============================================
   ANKET TABLOSU
   ============================================= */

.anket-table-container {
    overflow-x: auto;
    margin: 0 -15px;
    padding: 0 15px;
}

.anket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.anket-table th,
.anket-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.anket-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
    position: sticky;
    top: 0;
}

.anket-table tbody tr:hover {
    background: #f9f9f9;
}

.anket-table tbody tr.selected {
    background: #e3f2fd;
}

.anket-table tbody tr {
    cursor: pointer;
}

.actions-cell {
    white-space: nowrap;
}

.btn-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 8px;
    font-size: 16px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-action:hover {
    background: #e0e0e0;
}

.btn-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =============================================
   BADGE'LER
   ============================================= */

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-secondary {
    background: #e0e0e0;
    color: #666;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-listedisi {
    background: #9b59b6;
    color: white;
    margin-left: 5px;
}

.row-duzenleme {
    background: #fff3cd !important;
}

.row-duzenleme:hover {
    background: #ffe69c !important;
}

.duzenleme-uyari {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.duzenleme-uyari strong {
    display: inline;
    margin-right: 5px;
}

.text-danger {
    color: #dc3545 !important;
}

/* =============================================
   EMPTY STATE
   ============================================= */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    margin: 10px 0;
}

.empty-state .hint {
    font-size: 0.9em;
    color: #bbb;
}

/* =============================================
   CONNECTION STATUS
   ============================================= */

.connection-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

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

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

/* =============================================
   YENİ ANKET SAYFASI
   ============================================= */

.header-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.header-row h1 {
    margin: 0;
    flex: 1;
}

.btn-back {
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #e0e0e0;
}

.btn-back-survey {
    position: fixed;
    top: 10px;
    left: 10px;
    background: #f0f0f0;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-back-survey:hover {
    background: #e0e0e0;
}

.anketor-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

.filter-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-section h3 {
    margin: 0 0 15px 0;
    font-size: 1em;
    color: #555;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.list-section {
    margin-bottom: 20px;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.list-header h3 {
    margin: 0;
    font-size: 1em;
    color: #555;
}

.anket-liste {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.anket-radio {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.action-section {
    text-align: center;
    margin-bottom: 30px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.manual-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.btn-toggle {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.btn-toggle:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.manuel-form {
    background: #fff9e6;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #ffeeba;
}

.manuel-form.hidden {
    display: none;
}

.manuel-form .hint {
    font-size: 13px;
    color: #856404;
    margin: 10px 0;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .anket-table {
        font-size: 12px;
    }
    
    .anket-table th,
    .anket-table td {
        padding: 8px 5px;
    }
    
    .btn-action {
        padding: 3px 5px;
        font-size: 14px;
    }
    
    .anketor-info-display {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}
