/* =================================================================== MERKEZİ STİL DOSYASI (style.css) - GELİŞTİRİLMİŞ VE EKSİKSİZ VERSİYON =================================================================== */

/* 1. TEMEL AYARLAR VE DEĞİŞKENLER (BASE & VARIABLES) ------------------------------------------------------------------- */

:root {
	--primary-color: #0d6efd;
	--secondary-color: #6c757d;
	--success-color: #198754;
	--danger-color: #dc3545;
	--warning-color: #ffc107;
	--info-color: #17a2b8;
	/* edit-btn için */
	--orange-color: #fd7e14;
	/* reset-btn için */
	--light-color: #f8f9fa;
	--dark-color: #212529;
	--header-text: #f8f9fa;
	--border-color: #dee2e6;
	--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--base-font-size: 16px;
	--border-radius: 0.375rem;
	/* 6px */
}
*, *::before, *::after {
	box-sizing: border-box;
}
html {
	font-size: var(--base-font-size);
}
body {
	font-family: var(--font-family);
	background-color: var(--light-color);
	color: var(--dark-color);
	margin: 0;
	padding-top: 70px;
	/* Sabit header için boşluk */
	line-height: 1.5;
}
/* 2. YARDIMCI SINIFLAR (UTILITY CLASSES) ------------------------------------------------------------------- */

.container {
	width: 95%;
	max-width: 1600px;
	margin: 20px auto;
	padding: 0 15px;
}
.table-responsive {
	width: 100%;
	overflow-x: auto;
}
.header-flex {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
	gap: 1rem;
}
/* 3. TİPOGRAFİ (TYPOGRAPHY) ------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-weight: 600;
	line-height: 1.2;
}
h1 {
	font-size: 1.75rem;
}
/* ~28px */

h2 {
	font-size: 1.5rem;
}
/* ~24px */

h3 {
	font-size: 1.25rem;
}
/* ~20px */

a {
	color: var(--primary-color);
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
small {
	font-size: 0.875em;
}
em {
	font-style: italic;
	color: var(--secondary-color);
}
.section-title {
	font-size: 1.5rem;
	color: var(--dark-color);
	margin-top: 2.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 2px solid var(--border-color);
	padding-bottom: 0.75rem;
	display: flex;
	align-items: center;
	gap: 10px;
}
.section-title:first-of-type {
	margin-top: 0;
}
/* 4. BUTON SİSTEMİ (BUTTON SYSTEM) ------------------------------------------------------------------- */

.button {
	display: inline-block;
	font-weight: 600;
	line-height: 1.5;
	color: #fff;
	text-align: center;
	text-decoration: none;
	vertical-align: middle;
	cursor: pointer;
	user-select: none;
	background-color: transparent;
	border: 1px solid transparent;
	padding: 0.5rem 1rem;
	font-size: 1rem;
	border-radius: var(--border-radius);
	transition: all 0.2s ease-in-out;
}
.button:hover {
	filter: brightness(90%);
	text-decoration: none;
	color: #fff;
}
/* Buton Renkleri */

.button-primary {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}
.button-secondary {
	background-color: var(--secondary-color);
	border-color: var(--secondary-color);
}
.button-success {
	background-color: var(--success-color);
	border-color: var(--success-color);
}
.button-danger {
	background-color: var(--danger-color);
	border-color: var(--danger-color);
}
.button-warning {
	background-color: var(--warning-color);
	border-color: var(--warning-color);
	color: #333;
}
.button-info {
	background-color: var(--info-color);
	border-color: var(--info-color);
}
.button-orange {
	background-color: var(--orange-color);
	border-color: var(--orange-color);
}
/* Küçük Buton (Tablo içi işlemler için) */

.button-sm {
	padding: 0.25rem 0.5rem;
	font-size: 0.875rem;
}
/* 5. FORM ELEMENTLERİ (FORMS) ------------------------------------------------------------------- */

.form-container {
	margin: 2rem auto;
	padding: 2rem;
	max-width: 600px;
	background-color: var(--card-bg);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.form-container label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}
.form-container input[type="text"], .form-container textarea {
	display: block;
	width: 100%;
	padding: 0.5rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--dark-color);
	background-color: #fff;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
	margin-bottom: 1rem;
}
.form-container input[type="text"]:focus, .form-container textarea:focus {
	color: var(--dark-color);
	background-color: #fff;
	border-color: #86b7fe;
	outline: 0;
	box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.add-ssl-form {
	display: flex;
	gap: 10px;
	margin: 1.5rem auto;
	background-color: var(--card-bg);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	max-width: 600px;
}
.add-ssl-form input[type="text"] {
	flex-grow: 1;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	font-size: 1rem;
}
/* 6. BİLEŞENLER (COMPONENTS) ------------------------------------------------------------------- */

/* Header & Nav */

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: var(--dark-color);
	color: var(--header-text);
	padding: 0 30px;
	height: 70px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	z-index: 1000;
	box-sizing: border-box;
}
.header .logo a {
	color: var(--header-text);
	text-decoration: none;
	font-size: 24px;
	font-weight: bold;
}
.nav-menu {
	display: flex;
	align-items: center;
	gap: 15px;
	height: 100%;
}
.nav-item {
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
}
.nav-link {
	color: var(--header-text);
	text-decoration: none;
	font-weight: 500;
	font-size: 16px;
	display: flex;
	align-items: center;
	padding: 0 15px;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
	height: 100%;
}
.nav-link:hover, .nav-link.active {
	background-color: rgba(255, 255, 255, 0.1);
}
.nav-link i {
	margin-right: 8px;
}
.dropdown-arrow {
	margin-left: auto;
	font-size: 12px;
	transition: transform 0.3s ease;
}
.dropdown-arrow.active {
	transform: rotate(180deg);
}
.dropdown-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background-color: #343a40;
	border-radius: 0 0 6px 6px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
	list-style: none;
	padding: 10px 0;
	margin: 0;
	z-index: 1001;
	min-width: 200px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav-item:hover>.dropdown-menu {
	display: block;
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.dropdown-item {
	text-decoration: none;
	display: block;
	padding: 10px 20px;
	font-size: 15px;
	color: var(--header-text);
}
.dropdown-item:hover {
	background-color: var(--primary-color);
}
.mobile-menu-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--header-text);
	font-size: 24px;
	cursor: pointer;
}
/* Dashboard Cards & Gauges */

.overview-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 25px;
	align-items: center;
}
.dashboard-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 25px;
	width: 100%;
}
.dashboard-card {
	background-color: var(--card-bg);
	padding: 25px;
	border-radius: var(--border-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border-left: 5px solid var(--primary-color);
}
.dashboard-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}
.card-icon {
	font-size: 40px;
	margin-bottom: 15px;
	color: var(--primary-color);
}
.card-title {
	font-size: 1rem;
	color: var(--secondary-color);
	margin: 0 0 10px 0;
	font-weight: 500;
}
.stat-value {
	font-size: 2.25rem;
	font-weight: 700;
	margin: 0;
	color: var(--primary-color);
}
.card-danger {
	border-left-color: var(--danger-color);
}
.card-danger .card-icon, .card-danger .stat-value {
	color: var(--danger-color);
}
.card-success {
	border-left-color: var(--success-color);
}
.card-success .card-icon, .card-success .stat-value {
	color: var(--success-color);
}
.card-warning {
	border-left-color: var(--warning-color);
}
.card-warning .card-icon, .card-warning .stat-value {
	color: var(--warning-color);
}
.gauge-card {
	position: relative;
	background-color: var(--card-bg);
	padding: 5px;
	border-radius: var(--border-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	text-align: center;
	min-width: 0;  
}
.gauge-card canvas { 
  width: 100% !important; 
  height: auto !important;
}

.gauge-card h3 {
	font-size: 1rem;
	color: var(--secondary-color);
	font-weight: 600;
	margin-top: 10px;
}
.gauge-value {
	position: absolute;
	top: 55%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--dark-color);
	pointer-events: none;
}
.date-time {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--secondary-color);
}
/* Data Tables */

.server-table {
	width: 100%;
	margin-bottom: 1rem;
	color: #212529;
	vertical-align: top;
	border-color: var(--border-color);
	border-collapse: collapse;
	background-color: var(--card-bg);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	font-size: 0.9rem;
}
.server-table th, .server-table td {
	padding: 0.75rem;
	border: 1px solid var(--border-color);
	vertical-align: middle;
}
.server-table thead th {
	background-color: #e9ecef;
	font-weight: 600;
}
.server-table tbody tr:nth-child(even) {
	background-color: var(--light-color);
}
.server-table td a, .server-table td a:visited {
	color: inherit;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}
.server-table td a:hover {
	color: var(--primary-color);
	text-decoration: underline;
}
.server-table th a {
	color: inherit;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.server-table th a:hover {
	color: var(--primary-color);
}
.sort-icon {
	font-size: 1em;
	margin-left: 8px;
	color: var(--secondary-color);
}
.sort-icon.active {
	color: var(--primary-color);
}
/* Status Badges */

.status-badge {
	padding: 0.35em 0.65em;
	font-size: .8em;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: 50rem;
}
.status-normal, .status-badge.status-ssl-ok {
	background-color: var(--success-color);
}
.status-warning, .status-badge.status-ssl-warning {
	background-color: var(--warning-color);
	color: #333;
}
.status-critical, .status-badge.status-ssl-danger {
	background-color: var(--danger-color);
}
.status-badge.status-allowed {
	background-color: var(--success-color);
}
.status-badge.status-not-allowed {
	background-color: var(--danger-color);
}
.status-badge.status-ssl-expired {
	background-color: var(--dark-color);
}
/* Text & Count Helpers */

.text-danger {
	color: var(--danger-color) !important;
	font-weight: bold;
}
.text-warning {
	color: var(--warning-color) !important;
	font-weight: bold;
}
.text-success {
	color: var(--success-color) !important;
}
.count-high {
	color: var(--danger-color);
	font-weight: bold;
	font-size: 0.875em;
}
.count-normal {
	color: var(--secondary-color);
	font-size: 0.875em;
}
/* Action Buttons in Tables */

.actions-cell {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}
.actions-cell form {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	box-shadow: none;
}
.note-input {
	width: 120px;
	font-size: 12px;
	padding: 4px;
	margin-right: 5px;
}
/* Flash Messages */

.flash-message {
	padding: 1rem;
	margin-bottom: 1rem;
	border: 1px solid transparent;
	border-radius: var(--border-radius);
}
.flash-success {
	color: #0f5132;
	background-color: #d1e7dd;
	border-color: #badbcc;
}
.flash-error {
	color: #842029;
	background-color: #f8d7da;
	border-color: #f5c2c7;
}
/* Footer */

.footer {
	text-align: center;
	padding: 20px;
	margin-top: 40px;
	background-color: #e9ecef;
	color: var(--secondary-color);
	font-size: 14px;
	border-top: 1px solid var(--border-color);
}
.nav-menu, .nav-menu ul { list-style: none; margin: 0; padding: 0; }

/* 7. MOBİL UYUMLULUK (RESPONSIVE) ------------------------------------------------------------------- */
@media (max-width: 992px) {
  html { font-size: 15px; }

  .mobile-menu-toggle { display: block; }
  .overview-container { grid-template-columns: repeat(2, 1fr); }
  /* Header sabit; menü onun ALTINDA tam ekran overlay */
  .nav-menu {
    position: fixed;            /* absolute yerine fixed */
    top: 70px;                  /* header yüksekliği */
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;                /* 100% yerine auto */
    height: calc(100vh - 70px);
    display: none;              /* toggle ile açılacak */
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 40px;
    background-color: #2c3034;
    border-top: 1px solid #495057;
    overflow-y: auto;           /* uzun listede scroll */
    z-index: 3000;              /* içerik üstünde kalsın */
  }
  .nav-menu.active { display: flex; }

  .nav-item {
    display: block;       /* desktop'taki flex'i override et */
    width: 100%;
    height: auto;
  }
  .nav-link {
    width: 100%;
    padding: 16px 24px;
    height: auto;
    justify-content: flex-start;
  }

  /* Desktop hover kuralını etkisizleştir */
  .nav-item:hover > .dropdown-menu { display: block; }

  .dropdown-menu{
    position: static;            /* sağa kayan kutuyu iptal */
    display: block;              /* JS max-height ile aç/kapa */
    width: 100%;                 /* TAM GENİŞLİK */
    max-height: 0;               /* kapalı başlangıç */
    overflow: hidden;
    transition: max-height .35s ease;

    /* desktop kalıntılarını ez */
    min-width: 0 !important;
    left: auto !important;
    top: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;

    /* kozmetik */
    margin: 0;
    padding: 0;
    background: rgba(0,0,0,.2);
    box-shadow: none;
    border-radius: 0;
    border-top: 1px solid #3b4045;  /* istersen ayırıcı çizgi */
  }
  .nav-item[data-open="true"] .dropdown-menu { max-height: 1000px; }

  .dropdown-item {
    display: block;
    padding: 12px 24px 12px 40px;  /* soldan hafif içe girsin */
    color: var(--header-text);
  }
  .dropdown-arrow { margin-left: auto; transition: transform .3s ease; }
  .nav-item[data-open="true"] .dropdown-arrow { transform: rotate(180deg); }
  .nav-item[data-open="true"] .dropdown-menu { max-height: 1000px; }

  .dropdown-item { padding: 12px 40px; }

  .dropdown-arrow { margin-left: auto; transition: transform .3s ease; }
  .nav-item[data-open="true"] .dropdown-arrow { transform: rotate(180deg); }

  /* Menü açıkken sayfayı arkada kaydırma */
  body.menu-open { overflow: hidden; }
}
.nav-menu, .nav-menu ul { list-style: none; margin: 0; padding: 0; }

@media (max-width: 768px) {
  html { font-size: 14px; }
  body { padding-top: 60px; }
  .header { height: 60px; padding: 0 15px; }
  .nav-menu { top: 60px; height: calc(100vh - 60px); }
  .overview-container { grid-template-columns: 1fr; }
}
/* assets/css/style.css dosyasının sonuna eklenecek */

/* ----- LOGIN SAYFASI STİLLERİ ----- */

/* Login sayfasının body'sine özel arkaplan ve merkezleme */

body.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding-top: 0;
	/* Header olmadığı için üst boşluğu sıfırla */
	background: #e9ecef;
	background: linear-gradient(to bottom, #f8f9fa, #dee2e6);
}
/* Login formunu içeren ana kutu */

.login-container {
	width: 100%;
	max-width: 400px;
	padding: 2.5rem;
	/* rem birimi ile orantılı boşluk */
	background-color: var(--card-bg);
	border-radius: var(--border-radius);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
	text-align: center;
}
.login-container h1 {
	font-size: 1.75rem;
	margin-bottom: 2rem;
}
/* Login formundaki input alanları */

.login-container input[type="text"], .login-container input[type="password"] {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	margin-bottom: 1rem;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
}
.login-container .flash-message {
	margin-top: 1.5rem;
	text-align: center;
}
.hidden {
	display: none !important;
}
/* assets/css/style.css dosyasının sonuna eklenecek */

/* ----- Filtreleme Formu Stilleri ----- */

.filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	align-items: center;
	padding: 1.5rem;
	background-color: var(--card-bg);
	border-radius: var(--border-radius);
	margin-bottom: 2rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.filter-form input[type="text"], .filter-form select {
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	font-size: 0.9rem;
}
/* Tooltip Stili */

.tooltip {
	position: relative;
	display: inline-block;
	cursor: help;
	border-bottom: 1px dotted var(--secondary-color);
}
.tooltip .tooltiptext {
	visibility: hidden;
	width: 250px;
	background-color: var(--dark-color);
	color: #fff;
	text-align: left;
	padding: 10px;
	border-radius: var(--border-radius);
	position: absolute;
	z-index: 1;
	bottom: 125%;
	left: 50%;
	margin-left: -125px;
	/* width'in yarısı */
	opacity: 0;
	transition: opacity 0.3s;
	pointer-events: none;
}
.tooltip:hover .tooltiptext {
	visibility: visible;
	opacity: 1;
}
/* "Status Badges" bölümünü bununla değiştirin */

.status-badge {
	padding: 0.35em 0.65em;
	font-size: .8em;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	text-align: center;
	white-space: nowrap;
	vertical-align: baseline;
	border-radius: 50rem;
}
.status-normal, .status-badge.status-success, .status-badge.status-allowed, .status-badge.status-ssl-ok {
	background-color: var(--success-color);
}
.status-warning, .status-badge.status-ssl-warning {
	background-color: var(--warning-color);
	color: #333;
}
.status-critical, .status-badge.status-danger, .status-badge.status-not-allowed, .status-badge.status-ssl-danger {
	background-color: var(--danger-color);
}
.status-badge.status-ssl-expired, .status-badge.status-purple {
	background-color: #6f42c1;
}
.status-badge.status-info {
	background-color: var(--info-color);
}
.status-badge.status-secondary {
	background-color: var(--secondary-color);
}
/* assets/css/style.css dosyasının sonuna eklenecek */

/* ----- Tablo Hücresi İçindeki Etiket (Badge) Düzeni ----- */

.badge-cell {
	display: flex;
	flex-direction: column;
	/* Elementleri dikeyde (alt alta) sırala */
	align-items: flex-start;
	/* Elementleri hücrenin soluna hizala */
	gap: 5px;
	/* Her bir etiket arasına 5px boşluk bırak */
}