/* ================================================
   Dahinet - Domain Yönetim Sayfası Stilleri
   domains.css — Part 1: Layout, Header, Stats, Toolbar
   ================================================ */

/* ── Page Wrapper ── */
.dn-domains-page {
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Alert ── */
.dn-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}
.dn-alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

/* ── Page Header ── */
.dn-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}
.dn-page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.dn-page-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #0066CC 0%, #00D4FF 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35);
}
.dn-page-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 2px;
    line-height: 1.2;
}
.dn-page-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}
.dn-page-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.dn-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.dn-btn-primary {
    background: linear-gradient(135deg, #0066CC 0%, #0099FF 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}
.dn-btn-primary:hover {
    background: linear-gradient(135deg, #0052a3 0%, #007acc 100%);
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.4);
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}
.dn-btn-outline {
    background: #fff;
    color: #0066CC;
    border: 1.5px solid #0066CC;
}
.dn-btn-outline:hover {
    background: #e8f0fe;
    transform: translateY(-1px);
    color: #0052a3;
    text-decoration: none;
}

/* ── Stats Row ── */
.dn-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.dn-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dn-stat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.dn-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}
.dn-stat-active .dn-stat-icon   { background: #d1fae5; color: #059669; }
.dn-stat-expiring .dn-stat-icon { background: #fef3c7; color: #d97706; }
.dn-stat-expired .dn-stat-icon  { background: #fee2e2; color: #dc2626; }
.dn-stat-total .dn-stat-icon    { background: #e0e7ff; color: #4f46e5; }
.dn-stat-info { display: flex; flex-direction: column; }
.dn-stat-count {
    font-size: 1.625rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}
.dn-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 3px;
    font-weight: 500;
}

/* ── Toolbar ── */
.dn-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.dn-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}
.dn-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Search */
.dn-search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.dn-search-box > i {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}
.dn-search-input {
    height: 38px;
    padding: 0 14px 0 36px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 220px;
}
.dn-search-input:focus {
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.12);
}
.dn-search-input::placeholder { color: #9ca3af; }

/* Filter Tabs */
.dn-filter-tabs {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.dn-filter-tab {
    padding: 5px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.dn-filter-tab:hover { color: #374151; background: #e9eaec; }
.dn-filter-tab.active {
    background: #fff;
    color: #0066CC;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* View Toggle */
.dn-view-btn {
    width: 36px;
    height: 36px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 0.9375rem;
}
.dn-view-btn:hover { border-color: #0066CC; color: #0066CC; }
.dn-view-btn.active {
    background: #0066CC;
    border-color: #0066CC;
    color: #fff;
}

/* Domain name (simplified - no regex split) */
.dn-domain-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
    transition: color 0.15s ease;
}
.dn-domain-link:hover .dn-domain-name { color: #0066CC; }

/* ================================================
   Part 2: Bulk Bar, Table, Grid, Empty, Responsive
   ================================================ */

/* ── Bulk Actions Bar ── */
.dn-bulk-bar {
    background: #1e3a5f;
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 16px rgba(0,102,204,0.25);
}
.dn-bulk-bar-left { display: flex; align-items: center; }
.dn-bulk-count { font-size: 0.875rem; font-weight: 600; color: #93c5fd; }
.dn-bulk-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dn-bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #e0f2fe;
    transition: all 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
}
.dn-bulk-btn:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); color: #fff; }
.dn-bulk-btn-cancel { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #fca5a5; }
.dn-bulk-btn-cancel:hover { background: rgba(239,68,68,0.28); border-color: #ef4444; color: #fff; }
.dn-bulk-dropdown { position: relative; }
.dn-bulk-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 220px;
    z-index: 100;
    overflow: hidden;
    display: none;
}
.dn-bulk-dropdown-menu.open { display: block; }
.dn-bulk-drop-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; font-size: 0.875rem; color: #374151;
    text-decoration: none; transition: background 0.15s ease;
}
.dn-bulk-drop-item:hover { background: #f3f4f6; color: #0066CC; }

/* ── Table Container ── */
.dn-table-container {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.dn-domains-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.dn-domains-table thead tr { background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.dn-domains-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    white-space: nowrap;
}
.dn-th-check  { width: 42px; }
.dn-th-ssl    { width: 42px; }
.dn-th-domain { min-width: 200px; }
.dn-th-date   { width: 140px; }
.dn-th-status { width: 130px; }
.dn-th-action { width: 100px; text-align: right; }

.dn-domain-row {
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s ease;
}
.dn-domain-row:last-child { border-bottom: none; }
.dn-domain-row:hover { background: #f8fafc; }
.dn-domain-row.dn-row-expiring { background: #fffbeb; }
.dn-domain-row.dn-row-expiring:hover { background: #fef3c7; }
.dn-domains-table td { padding: 14px 16px; vertical-align: middle; }
.dn-td-check  { width: 42px; }
.dn-td-ssl    { width: 42px; text-align: center; }
.dn-td-action { text-align: right; }

.dn-checkbox { width: 16px; height: 16px; accent-color: #0066CC; cursor: pointer; border-radius: 4px; }
.dn-ssl-icon { margin: 0 auto; display: block; }
.dn-ssl-placeholder { width: 22px; height: 22px; }

.dn-domain-name-wrap { display: flex; flex-direction: column; gap: 4px; }
.dn-domain-link {
    display: inline-flex; align-items: baseline;
    font-weight: 600; color: #111827;
    text-decoration: none; transition: color 0.15s ease;
}
.dn-domain-link:hover { color: #0066CC; text-decoration: none; }
.dn-domain-sld { font-size: 0.9375rem; color: inherit; }
.dn-domain-tld { font-size: 0.9375rem; color: #0066CC; }
.dn-domain-meta { display: flex; align-items: center; gap: 6px; }
.dn-meta-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px;
    font-size: 0.7rem; font-weight: 600;
}
.dn-meta-autorenew { background: #d1fae5; color: #065f46; }
.dn-meta-manual    { background: #f3f4f6; color: #6b7280; }

.dn-date-val { display: flex; flex-direction: column; gap: 3px; color: #374151; font-size: 0.875rem; }
.dn-date-warn { color: #d97706; font-weight: 600; }
.dn-expiry-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.7rem; font-weight: 600; color: #d97706;
    background: #fef3c7; padding: 2px 7px;
    border-radius: 20px; border: 1px solid #fcd34d;
}

.dn-status {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.dn-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dn-status-active   { background: #d1fae5; color: #065f46; }
.dn-status-active .dn-dot   { background: #10b981; box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
.dn-status-expired  { background: #fee2e2; color: #991b1b; }
.dn-status-expired .dn-dot  { background: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,0.25); }
.dn-status-pending  { background: #fef3c7; color: #92400e; }
.dn-status-pending .dn-dot  { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,0.25); }
.dn-status-cancelled { background: #f3f4f6; color: #374151; }
.dn-status-cancelled .dn-dot { background: #9ca3af; }

.dn-manage-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; background: #f8fafc;
    border: 1.5px solid #e5e7eb; border-radius: 7px;
    font-size: 0.8125rem; font-weight: 600; color: #374151;
    text-decoration: none; transition: all 0.18s ease; white-space: nowrap;
}
.dn-manage-btn:hover {
    background: #0066CC; border-color: #0066CC; color: #fff;
    text-decoration: none; box-shadow: 0 2px 8px rgba(0,102,204,0.3);
}
.dn-table-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 32px; color: #6b7280; font-size: 0.875rem;
}

/* ── Empty State ── */
.dn-empty-row td { border: none !important; }
.dn-empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 56px 24px; text-align: center;
}
.dn-empty-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 100%);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.75rem; color: #6366f1; margin-bottom: 20px;
}
.dn-empty-state h3 { font-size: 1.125rem; font-weight: 700; color: #111827; margin: 0 0 8px; }
.dn-empty-state p  { font-size: 0.875rem; color: #6b7280; margin: 0 0 24px; max-width: 320px; }
.dn-empty-actions  { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ── Grid View ── */
.dn-domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.dn-domain-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    overflow: hidden; cursor: pointer; position: relative;
    display: flex; flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.dn-domain-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-3px); border-color: #0066CC;
}
.dn-card-expiring { border-color: #fcd34d; }
.dn-card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
.dn-card-body {
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 16px 16px; gap: 8px; flex: 1;
}
.dn-card-globe {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 1.375rem; color: #3b82f6; margin-bottom: 4px;
}
.dn-card-domain { display: flex; align-items: baseline; font-weight: 700; font-size: 1rem; text-align: center; word-break: break-all; }
.dn-card-sld { color: #111827; }
.dn-card-tld { color: #0066CC; }
.dn-card-footer {
    border-top: 1px solid #f3f4f6; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dn-card-dates { display: flex; align-items: center; gap: 10px; flex: 1; }
.dn-card-date-item { display: flex; flex-direction: column; gap: 1px; }
.dn-card-date-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; font-weight: 600; }
.dn-card-date-val   { font-size: 0.8rem; font-weight: 600; color: #374151; }
.dn-card-date-sep   { width: 1px; height: 28px; background: #e5e7eb; }
.dn-card-manage-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 12px; background: #f8fafc;
    border: 1.5px solid #e5e7eb; border-radius: 7px;
    font-size: 0.75rem; font-weight: 600; color: #374151;
    text-decoration: none; transition: all 0.18s ease; white-space: nowrap;
}
.dn-card-manage-btn:hover { background: #0066CC; border-color: #0066CC; color: #fff; text-decoration: none; }
.dn-card-expiry-ribbon {
    background: #fef3c7; border-top: 1px solid #fcd34d; color: #d97706;
    font-size: 0.7rem; font-weight: 700; text-align: center; padding: 5px;
    display: flex; align-items: center; justify-content: center; gap: 4px;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .dn-stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .dn-page-header { flex-direction: column; align-items: flex-start; }
    .dn-page-header-right { width: 100%; }
    .dn-btn { flex: 1; justify-content: center; }
    .dn-toolbar { flex-direction: column; align-items: stretch; }
    .dn-toolbar-left { flex-direction: column; align-items: stretch; }
    .dn-search-input { min-width: unset; width: 100%; }
    .dn-filter-tabs { overflow-x: auto; }
    .dn-bulk-bar { flex-direction: column; align-items: flex-start; }
    .dn-th-date:nth-child(4),
    .dn-domains-table td:nth-child(4) { display: none; }
}
@media (max-width: 576px) {
    .dn-stats-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dn-stat-card { padding: 14px; }
    .dn-stat-count { font-size: 1.375rem; }
    .dn-domains-table th, .dn-domains-table td { padding: 10px; }
    .dn-domain-grid { grid-template-columns: 1fr; }
    .dn-page-title { font-size: 1.375rem; }
}
