/* style.css */
/* BYGEN Domain & Hosting Takip Paneli - Modern Vanilla CSS Styling */

:root {
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-color-focus: #8b5cf6;
    
    --accent-blue: #0284c7;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #0284c7 0%, #7c3aed 100%);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --status-success: #10b981;
    --status-warning: #f59e0b;
    --status-error: #ef4444;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-glow: 0 8px 30px 0 rgba(124, 58, 237, 0.06);
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 15px;
}
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    border-bottom-color: var(--accent-purple);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loader-container p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Login Wrapper */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(124, 58, 237, 0.04) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.04) 0%, transparent 40%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-glow), var(--shadow-card);
    backdrop-filter: blur(16px);
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.login-logo {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-title {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Forms & Inputs */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-control {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}
.input-control:focus {
    border-color: var(--border-color-focus);
    box-shadow: 0 0 0 3px rgba(155, 93, 229, 0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(155, 93, 229, 0.2);
    width: 100%;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(155, 93, 229, 0.35);
}
.btn:active {
    transform: translateY(1px);
}
.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    box-shadow: none;
}
.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: none;
}
.btn-danger {
    background: var(--status-error);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.error-message {
    color: var(--status-error);
    font-size: 0.85rem;
    margin-top: 15px;
    display: none;
}

/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    margin-bottom: 40px;
}
.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-version {
    font-size: 0.75rem;
    color: var(--text-muted);
    background-color: rgba(0, 0, 0, 0.04);
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
}
.menu-item i {
    width: 18px;
    height: 18px;
}
.menu-item:hover {
    color: var(--text-primary);
    background-color: rgba(0, 0, 0, 0.03);
}
.menu-item.active {
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(155, 93, 229, 0.15);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}
.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.btn-logout {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.btn-logout:hover {
    color: var(--status-error);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
    background: radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.03) 0%, transparent 35%);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}
.page-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
}
.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.actions-row {
    display: flex;
    gap: 12px;
}

/* Dashboard Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-card);
}
.stat-card:hover {
    border-color: rgba(0, 0, 0, 0.06);
    background-color: var(--bg-card-hover);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(124, 58, 237, 0.08);
    color: var(--accent-purple);
}
.stat-card:nth-child(2) .stat-icon {
    background-color: rgba(2, 132, 199, 0.08);
    color: var(--accent-blue);
}
.stat-card:nth-child(3) .stat-icon {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--status-success);
}
.stat-card:nth-child(4) .stat-icon {
    background-color: rgba(245, 158, 11, 0.08);
    color: var(--status-warning);
}

.stat-details {
    display: flex;
    flex-direction: column;
}
.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Sections & Panel Layouts */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-card);
    margin-bottom: 30px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.panel-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 18px;
    height: 18px;
}
.search-input {
    padding-left: 44px;
}

.select-filter {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

/* Table styling */
.table-wrapper {
    overflow-x: auto;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.custom-table th {
    padding: 16px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.custom-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
}
.custom-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.015);
}

.domain-cell {
    display: flex;
    flex-direction: column;
}
.domain-name {
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}
.domain-name:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}
.domain-registrar {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--status-success);
}
.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--status-warning);
}
.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--status-error);
}
.badge-info {
    background-color: rgba(0, 191, 255, 0.1);
    color: var(--accent-blue);
}

.days-left-glow {
    font-weight: 700;
}
.days-left-glow.safe { color: var(--status-success); }
.days-left-glow.warning { color: var(--status-warning); }
.days-left-glow.danger {
    color: var(--status-error);
}

/* Service indicators */
.services-indicators {
    display: flex;
    gap: 6px;
}
.service-dot {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-muted);
}
.service-dot.active {
    background-color: rgba(0, 191, 255, 0.15);
    color: var(--accent-blue);
}
.service-dot.active.ssl {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--status-success);
}
.service-dot.active.web {
    background-color: rgba(155, 93, 229, 0.15);
    color: var(--accent-purple);
}
.service-dot.active.design-entry {
    background-color: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

/* Action buttons */
.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}
.btn-icon.edit:hover {
    color: var(--accent-blue);
}
.btn-icon.delete:hover {
    color: var(--status-error);
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
}
.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 850px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Detail modal tabs */
.tab-headers {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
    gap: 20px;
}
.tab-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 5px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    outline: none;
}
.tab-button.active {
    color: var(--text-primary);
    font-weight: 600;
}
.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

/* Two-column layout in form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Checkbox Group styling */
.services-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.service-checkbox-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    user-select: none;
}
.service-checkbox-card input {
    accent-color: var(--accent-purple);
    width: 16px;
    height: 16px;
}
.service-checkbox-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
}

/* Credentials visual styles */
.credential-box {
    background-color: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}
.credential-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 8px;
}
.credential-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input-wrapper input {
    padding-right: 44px;
}
.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.password-toggle-btn:hover {
    color: var(--text-primary);
}

/* Multiple emails list */
.emails-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.email-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

/* DNS Checker display */
.dns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.dns-box {
    background-color: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 15px;
}
.dns-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}
.dns-values {
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-all;
    max-height: 100px;
    overflow-y: auto;
}
.dns-values .empty {
    color: var(--text-muted);
    font-style: italic;
}

.dns-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--status-success);
    margin-bottom: 20px;
    font-weight: 500;
}
.dns-status-banner.warning {
    background-color: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--status-warning);
}

/* BTK Reports Panel Layout */
.btk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 15px;
}
@media (max-width: 768px) {
    .btk-grid {
        grid-template-columns: 1fr;
    }
}
.btk-card {
    background-color: rgba(0, 0, 0, 0.015);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.btk-card-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.btk-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Utilities */
.text-center { text-align: center; }
.text-success { color: var(--status-success); }
.text-warning { color: var(--status-warning); }
.text-danger { color: var(--status-error); }
.flex-space { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fadeIn {
    animation: fadeIn 0.3s ease-out forwards;
}
