/* e-Mükellef Reference Theme - GİB E-Arşiv SaaS Portal */
:root {
  --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --primary-red: #b71c1c;
  --primary-red-hover: #880e4f;
  --bg-sidebar: #990000;
  --bg-body: #eceff1;
  --bg-card: #ffffff;
  --border-color: #cfd8dc;
  
  --text-dark: #263238;
  --text-muted: #546e7a;
  
  --success: #2e7d32;
  --warning: #f57f17;
  --danger: #c62828;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
}

body {
  background-color: var(--bg-body);
  color: var(--text-dark);
  min-height: 100vh;
}

.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-center { text-align: center; }
.text-success { color: var(--success); font-weight: 600; }

/* Login Screen */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #b71c1c 0%, #311b92 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.emukellef-badge {
  width: 60px;
  height: 60px;
  background: var(--primary-red);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.brand-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.brand-header h1 {
  font-size: 1.5rem;
  color: var(--primary-red);
}

/* App Layout */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #990000 0%, #7b0000 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.tenant-profile-box {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tenant-icon {
  font-size: 2rem;
}

.tenant-info h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.tenant-vkn {
  font-size: 0.75rem;
  opacity: 0.8;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu-item:hover, .menu-item.active {
  background: rgba(0, 0, 0, 0.2);
  color: #ffffff;
  border-left: 4px solid #ffffff;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
}

.top-header {
  height: 56px;
  background: #b71c1c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.header-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.content-view {
  display: none;
  padding: 1.5rem;
}

.content-view.active {
  display: block;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filter-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* e-Mükellef Table Style */
.table-card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.emukellef-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.emukellef-table th {
  background: #f5f5f5;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.emukellef-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

.emukellef-table tbody tr:hover {
  background: #fafafa;
}

/* Dropdown Menu ("Tıkla ▾") */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.btn-tikla {
  background: var(--primary-red);
  color: #ffffff;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-tikla:hover {
  background: var(--primary-red-hover);
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 100;
  min-width: 160px;
  display: none;
}

.dropdown-container.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-dark);
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
}

.dropdown-item:hover {
  background: #f5f5f5;
  color: var(--primary-red);
}

/* Form Controls & Cards */
.card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-red);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.col-6 { flex: 1; }

.btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--primary-red); color: #fff; }
.btn-danger { background: #d32f2f; color: #fff; }
.btn-success { background: #2e7d32; color: #fff; }
.btn-secondary { background: #78909c; color: #fff; }
.btn-outline-light { background: transparent; border: 1px solid #fff; color: #fff; }

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}

.modal-container {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex; flex-direction: column;
}

.modal-lg { max-width: 800px; }
.modal-sm { max-width: 400px; }

.modal-header {
  padding: 1rem 1.25rem;
  background: #f5f5f5;
  border-bottom: 1px solid var(--border-color);
  display: flex; justify-content: space-between; align-items: center;
}

.modal-close-btn { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; }
.modal-body { padding: 1.25rem; overflow-y: auto; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border-color); }
