:host{
  width: 100%;
  height: 100%;
}
.olcu-kayitlari-pencere {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 8px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

// Header
.pencere-baslik {
  background: #f8f9fa;
  color: #333;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;

  .baslik-icerik {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .baslik-sol {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .baslik-icon {
    font-size: 20px;
    opacity: 0.8;
  }

  .baslik-metin {
    h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      color: #333;
    }

    .subtitle {
      margin: 2px 0 0 0;
      font-size: 11px;
      color: #666;
    }
  }

  .kapat-btn {
    background: transparent;
    border: 1px solid #ddd;
    color: #666;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;

    &:hover {
      background: #f5f5f5;
      border-color: #999;
      color: #333;
    }
  }
}

// Araç Çubuğu
.ara-cubugu {
  background: #fff;
  padding: 8px 16px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;

  .ara-cubugu-sol {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }

  .arama-alani {
    position: relative;
    display: flex;
    align-items: center;
  }

  .arama-input {
    padding: 8px 36px 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    width: 250px;
    font-size: 13px;
    transition: all 0.2s ease;

    &:focus {
      outline: none;
      border-color: #1890ff;
      box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
    }
  }

  .arama-icon {
    position: absolute;
    right: 12px;
    color: #999;
    font-size: 14px;
    pointer-events: none;
  }

  .durum-filtre {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:focus {
      outline: none;
      border-color: #1890ff;
    }
  }

  .ara-cubugu-sag {
    display: flex;
    gap: 8px;
  }

  .export-btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;

    &:hover {
      background: #f5f5f5;
      border-color: #1890ff;
      color: #1890ff;
    }

    &.excel-btn:hover {
      background: #f6ffed;
      border-color: #52c41a;
      color: #52c41a;
    }

    &.pdf-btn:hover {
      background: #fff2e8;
      border-color: #fa8c16;
      color: #fa8c16;
    }
  }
}

// Ana İçerik
.pencere-icerik {
  flex: 1;
  overflow: hidden;
}

.icerik-layout {
  display: flex;
  height: 100%;
}

// Sol Panel
.sol-panel {
  width: 350px;
  border-right: 1px solid #e8e8e8;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

.panel-baslik {
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #e8e8e8;

  h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
  }
}

.dosya-listesi {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.dosya-item {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;

  &:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
  }

  &.secili {
    border-color: #1890ff;
    background: #f6ffed;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
  }

  .dosya-bilgi {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
  }

  .dosya-durum {
    .durum-ikon {
      font-size: 16px;
    }
  }

  .dosya-detay {
    .dosya-ad {
      font-weight: 500;
      color: #333;
      margin-bottom: 4px;
      font-size: 13px;
    }

    .dosya-meta {
      font-size: 11px;
      color: #999;
      display: flex;
      align-items: center;
      gap: 6px;

      .ayrac {
        opacity: 0.5;
      }
    }
  }

  .dosya-islemler {
    .sil-btn {
      background: none;
      border: none;
      color: #ff4d4f;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 14px;
      transition: all 0.2s ease;

      &:hover {
        background: #fff2f0;
      }
    }
  }
}

// Sağ Panel
.sag-panel {
  flex: 1;
  background: white;
  display: flex;
  flex-direction: column;
}

.islem-butonlari {
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  gap: 12px;

  .islem-btn {
    padding: 10px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;

    &:hover:not(:disabled) {
      border-color: #1890ff;
      color: #1890ff;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    &.\33 d-btn:hover {
      background: #f6ffed;
      border-color: #52c41a;
      color: #52c41a;
    }

    &.yenile-btn:hover:not(:disabled) {
      background: #fff2e8;
      border-color: #fa8c16;
      color: #fa8c16;
    }
  }
}

.olcu-listesi {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.olcu-item {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;

  .olcu-baslik {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }

  .olcu-bilgi {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .olcu-ikon {
    font-size: 16px;
  }

  .olcu-tanim {
    font-weight: 500;
    color: #333;
    font-size: 14px;
  }

  .olcu-deger {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 600;
    color: #1890ff;
  }

  .deger {
    font-size: 16px;
  }

  .birim {
    font-size: 12px;
    color: #666;
  }

  .olcu-detay {
    padding-left: 24px;
  }

  .olcu-aciklama {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
  }

  .olcu-meta {
    display: flex;
    gap: 16px;
    font-size: 11px;
    color: #999;
  }
}

// Boş Durumlar
.bos-durum {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #999;

  .bos-durum-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
  }

  .bos-durum-metin {
    p {
      margin: 0 0 4px 0;
      font-size: 14px;
      color: #666;
    }

    small {
      font-size: 12px;
      color: #999;
    }
  }
}

.bos-olcu {
  text-align: center;
  padding: 40px 20px;
  color: #999;

  .bos-olcu-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
  }

  p {
    margin: 0;
    font-size: 14px;
    color: #666;
  }

  small {
    font-size: 12px;
    color: #999;
  }
}

.secim-yok {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;

  .secim-yok-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
  }

  h4 {
    margin: 0 0 8px 0;
    color: #666;
  }

  p {
    margin: 0;
    font-size: 14px;
    color: #999;
  }
}

// Footer
.pencere-footer {
  background: #fafafa;
  border-top: 1px solid #e8e8e8;
  padding: 12px 20px;

  .footer-icerik {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .footer-sol {
    small {
      color: #666;
      font-size: 12px;
    }
  }

  .footer-btn {
    padding: 8px 16px;
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      background: #096dd9;
    }
  }
}

// Durum Etiketleri
.secili-bilgiler {
  display: flex;
  gap: 8px;
  align-items: center;
}

.durum-etiket {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: white;
}

.olcu-sayisi-etiket {
  padding: 4px 8px;
  background: #e8e8e8;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #666;
}

// Responsive
@media (max-width: 1024px) {
  .olcu-kayitlari-pencere {
    min-width: 500px;
    min-height: 350px;
    max-width: 90vw;
    max-height: 85vh;
  }

  .icerik-layout {
    flex-direction: column;
  }

  .sol-panel {
    width: 100%;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
  }

  .ara-cubugu {
    .ara-cubugu-sol {
      flex-direction: column;
      align-items: stretch;
    }

    .arama-input {
      width: 100%;
    }
  }
}

@media (max-width: 640px) {
  .olcu-kayitlari-pencere {
    resize: none; // Mobil'de resize engelle
  }

  .pencere-baslik {
    padding: 12px 16px;

    .baslik-sol {
      gap: 8px;
    }

    .baslik-icon {
      font-size: 20px;
    }

    .baslik-metin h3 {
      font-size: 16px;
    }
  }

  .ara-cubugu {
    padding: 8px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .islem-butonlari {
    flex-direction: column;
  }

  .olcu-listesi {
    padding: 12px 16px;
  }

  .sol-panel {
    max-height: 200px;
  }
}