* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    margin-left: 20%;
}

/* Header Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
}

.select-action {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
}

.select-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007AFF;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #0051D5;
}

.plus-icon {
    font-size: 18px;
    font-weight: 600;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px 8px 0px 0px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #007AFF;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin-left: auto;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Options Button */
.btn-options {
    width: 40px;
    height: 40px;
    padding: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-options:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-options.active {
    background: #e9ecef;
    border-color: #007AFF;
}

.dots-icon {
    font-size: 20px;
    line-height: 1;
    font-weight: bold;
    color: #495057;
}

/* Options Menu Popup */
.options-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 250px;
}

.options-menu.hidden {
    display: none;
}

.options-menu-content {
    padding: 8px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
}

.menu-item:hover {
    background: #f8f9fa;
}

.menu-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.menu-item-button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
    font-family: inherit;
}

.menu-item-button:hover {
    background: #f8f9fa;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 0px 0px 8px 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}



.table-container.show-folders .domains-table tbody tr:not(.group-header) td.domain-col {
    padding-left: 35px;
}

.domains-table {
    width: 100%;
    border-collapse: collapse;
}

.domains-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.domains-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #6c757d;
}

.domains-table tbody tr {
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.domains-table tbody tr:hover {
    background-color: #f8f9fa;
}

.domains-table td {
    padding: 15px 0 15px 15px;
    font-size: 14px;
    vertical-align: top;
}

.domains-table tr td:last-child {
    padding-right: 15px;
}

/* Group Header Styles */
.group-header {
    background: #e9ecef;
    font-weight: 600;
    font-size: 14px;
}

.group-header td {
    padding: 12px 0 12px 15px;
    color: #495057;
}

.group-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    user-select: none;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.group-info:hover {
    color: #212529;
}

.group-settings-btn {
    background: none;
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s ease;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.group-header:hover .group-settings-btn {
    opacity: 1;
}

.group-settings-btn:hover {
    background: #f8f9fa;
    color: #495057;
}

.folder-icon {
    color: #6c757d;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.group-header-content:hover .folder-icon {
    color: #495057;
}

.folder-icon.collapsed {
    transform: rotate(-90deg);
}

.group-name {
    font-weight: 600;
}

.group-count {
    font-weight: 400;
    color: #6c757d;
    font-size: 13px;
}

.hidden {
    display: none !important;
}

/* Checkbox Styles */
.checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-col {
    /* width: 50px; */
    padding-right: 0;
}
th.checkbox-col {
    padding: 15px 0 15px 15px;
}

.group-header .checkbox-col {
    width: 20px;
}

/* Domain Column */
.domain-col {
    min-width: 250px;
}

.domain-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.domain-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.domain-link:hover {
    color: #333;
    text-decoration: underline;
}

.domain-indicators {
    display: flex;
    align-items: center;
    gap: 4px;
}

.indicator {
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    opacity: 0.8;
}

.git-indicator {
    background: #f6f8fa;
    color: #24292f;
}

.ftp-indicator {
    background: #e1f5fe;
    color: #0277bd;
}

.subdomain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0 2px 16px;
    font-size: 12px;
    color: #6c757d;
    position: relative;
}

.subdomain-item:before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    width: 1px;
    height: 100%;
    background: #dee2e6;
    transform: translateY(-50%);
}

.subdomain-item:first-child:before {
    height: 50%;
    top: 50%;
}

.subdomain-item:last-child:before {
    height: 50%;
    top: 0;
}

.subdomain-item:only-child:before {
    display: none;
}

.subdomain-link {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.subdomain-link:hover {
    color: #333;
    text-decoration: underline;
}

.alias-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #6c757d;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.alias-pill-light {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(227.4, 237.2571428571, 241.2);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.alias-pill svg {
    width: 10px;
    height: 10px;
}

.alias-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alias-link {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.alias-link:hover {
    color: #333;
    text-decoration: underline;
}

.redirect-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #6c757d;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.redirect-pill-light {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(227.4, 237.2571428571, 241.2);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.redirect-pill svg {
    width: 10px;
    height: 10px;
}

.redirect-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.redirect-source {
    color: #1a1a1a;
    font-weight: 500;
}

.redirect-arrow {
    color: #6c757d;
    font-weight: bold;
}

.redirect-target {
    color: #007AFF;
    text-decoration: none;
    transition: color 0.2s;
}

.redirect-target:hover {
    color: #0051D5;
    text-decoration: underline;
}

.deploy-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #ff6b35;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.deploy-pill-light {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(227.4, 237.2571428571, 241.2);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.deploy-pill svg {
    width: 10px;
    height: 10px;
}

.subdomain-pills {
    display: flex;
    align-items: center;
    gap: 6px;
}

.engine-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.engine-performance {
    background: linear-gradient(135deg, #009900, #007acc);
}

.engine-apache {
    background: #007acc;
}

.engine-nginx {
    background: #009900;
}

.engine-supercache {
    background: #32cd32;
}

/* Light mode engine pills */
.engine-pill-light {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1F3137;
    background: #f8f9fa;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.engine-performance-light {
    border: 1px solid #009900;
    color: #004b7e;
}

.engine-apache-light {
    border: 1px solid #007acc;
}

.engine-nginx-light {
    border: 1px solid #009900;
}

.engine-supercache-light {
    border: 1px solid #32cd32;
}

.php-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #4F5B93;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.php-pill-light {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(227.4, 237.2571428571, 241.2);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.no-https-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #dc3545;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.no-https-pill-light {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(234, 112, 112);
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    word-break: keep-all;
    hyphens: none;
}

.subservices {
    font-size: 12px;
    color: #6c757d;
}

/* Disk Usage Column */
.disk-col {
    min-width: 150px;
}

.disk-usage {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.disk-value {
    font-size: 13px;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #28a745;
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Services Column */
.services-col {
    min-width: 300px;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    word-break: keep-all;
    hyphens: none;
}

/* Service badge colors */
.service-nginx {
    background: #e3f2fd;
    color: #1976d2;
}

.service-ftp {
    background: #fff3e0;
    color: #f57c00;
}

.service-database {
    background: #f3e5f5;
    color: #7b1fa2;
}

.service-git {
    background: #ffece6;
    color: #ff6b35;
}

.service-backup {
    background: #dc3545;
    color: white;
}

.service-dns {
    background: #e0f2f1;
    color: #00796b;
}

.service-external-dns {
    background: #fff4e5;
    color: #d84315;
}

.service-cron {
    background: #fff8e1;
    color: #f9a825;
}

.service-email {
    background: #e3f2fd;
    color: #1976d2;
}

.service-default {
    background: #eceff1;
    color: #546e7a;
}

/* Light mode service badges */
.service-badge-light {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    word-break: keep-all;
    hyphens: none;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(227.4, 237.2571428571, 241.2);
}

.service-backup-light {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    word-break: keep-all;
    hyphens: none;
    background: #f8f9fa;
    color: #1F3137;
    border: 1px solid rgb(234, 112, 112);
}

/* Expiration Column */
.expiration-col {
    min-width: 120px;
}

.expiration-date {
    font-size: 14px;
    color: #495057;
}

/* Actions Column */
.actions-col {
    min-width: 140px;
    text-align: right;
}

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-detail:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.eye-icon {
    width: 16px;
    height: 16px;
}

.dropdown-container {
    position: relative;
}

.btn-dropdown {
    width: 32px;
    height: 32px;
    padding: 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-dropdown:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-dropdown.active {
    background: #e9ecef;
    border-color: #007AFF;
}

.btn-dropdown .dots-icon {
    font-size: 16px;
    line-height: 1;
    font-weight: bold;
    color: #495057;
}

.row-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 180px;
}

.row-dropdown.hidden {
    display: none;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item:first-child:hover {
    color: #dc3545;
}

.dropdown-item svg {
    flex-shrink: 0;
}

/* Domain Detail Page Styles */

/* Sidebar Menu Styles */
.sidebar-menu {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: white;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Sidebar title link styling */
.sidebar-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.sidebar-title-link:hover {
    opacity: 0.8;
}

.sidebar-title-link h3 {
    margin: 0;
    cursor: pointer;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: #e9ecef;
    color: #212529;
}

.sidebar-item.active {
    background: white;
    color: #007AFF;
    border-left-color: #007AFF;
}

.sidebar-icon {
    flex-shrink: 0;
}

.sidebar-divider {
    height: 1px;
    background: #dee2e6;
    margin: 15px 0;
}

.sidebar-item-warning {
    color: #f0ad4e;
}

.sidebar-item-warning:hover {
    background: #fff8ed;
    color: #ec971f;
}

.sidebar-item-danger {
    color: #d9534f;
}

.sidebar-item-danger:hover {
    background: #fff5f5;
    color: #c9302c;
}

/* Show more/less button styles */
.show-more-container {
    margin-top: 8px;
}

.show-more-btn {
    background: none;
    border: 1px solid #dee2e6;
    padding: 4px 12px;
    border-radius: 4px;
    color: #6c757d;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.show-more-btn:hover {
    background: #f8f9fa;
    color: #495057;
    border-color: #adb5bd;
}

.subdomain-hidden {
    margin-top: 0;
}

/* Container adjustments */
.detail-container {
    max-width: 1200px;
}

.detail-container.with-sidebar {
    margin-left: 250px;
    padding-left: 40px;
}

.back-card {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.back-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-color: #007AFF;
    transform: translateY(-2px);
}

.back-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.back-card-content svg {
    color: #007AFF;
}

.back-text {
    color: #333;
}

/* Warning Info Box */
.warning-info-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.warning-icon {
    flex-shrink: 0;
}

.warning-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.warning-content {
    flex: 1;
}

.warning-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #856404;
    margin: 0 0 8px 0;
}

.warning-content p {
    font-size: 16px;
    color: #856404;
    margin: 0;
    line-height: 1.4;
}

.detail-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-header h1 {
    font-size: 24px;
}

.header-title {
    flex: 1;
}

.header-nav {
    flex-shrink: 0;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #f8f9fa;
    border-color: #007AFF;
    color: #007AFF;
}

.btn-back svg {
    flex-shrink: 0;
}

/* Panels Grid Layout */
.panels-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.panels-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panels-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Panel Styles */
.panel {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.panel:not(.panel-small) .panel-body {
    min-height: 120px;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.panel-body {
    padding: 20px;
    flex: 1;
}

.panel-footer {
    padding: 12px 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.panel-link {
    color: #007AFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.panel-link:hover {
    color: #0051D5;
    text-decoration: underline;
}

.panel-small .panel-body {
    padding: 15px;
}

/* Panel Content Styles */
.overview-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.overview-item {
    display: flex;
    gap: 10px;
}

.overview-item label {
    font-weight: 500;
    color: #6c757d;
    min-width: 120px;
}

.overview-value {
    color: #333;
}

.services-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.subdomains-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-list,
.databases-list,
.cron-list,
.admins-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.expiration-info {
    text-align: center;
}

.expiration-info .expiration-date {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.expiration-days {
    font-size: 14px;
    color: #6c757d;
}

.dns-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .panels-grid {
        grid-template-columns: 1fr;
    }

    .panels-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .header-title h1 {
        font-size: 20px;
    }

    .btn-back {
        width: 100%;
        justify-content: center;
    }

    .panels-sidebar {
        grid-template-columns: 1fr;
    }
}

#domainName {
    color: #007AFF;
    font-weight: 600;
}

.detail-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.detail-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    font-weight: 500;
    color: #6c757d;
    min-width: 120px;
}

.setting-value {
    font-size: 15px;
    color: #333;
}

.progress-bar-inline {
    display: inline-block;
    width: 100px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: middle;
    overflow: hidden;
}

.services-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.service-wildcard {
    background: #e8f5e9;
    color: #2e7d32;
}

.subdomains-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subdomain-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.subdomain-name {
    font-weight: 500;
    color: #333;
    margin-right: auto;
}

.alias-indicator {
    font-weight: 500;
    color: #6c757d;
}

.redirect-indicator {
    color: #d84315;
    font-weight: 500;
}

.engine-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.engine-performance {
    background: linear-gradient(135deg, #009900, #007acc);
}

.engine-apache {
    background: #007acc;
}

.engine-nginx {
    background: #009900;
}

.engine-supercache {
    background: #32cd32;
}

.php-badge {
    padding: 2px 8px;
    background: #4F5B93;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-https-badge {
    padding: 2px 8px;
    background: #dc3545;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deploy-badge {
    padding: 2px 8px;
    background: #ff6b35;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-placeholder {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    color: #6c757d;
}

/* File Manager Styles */
.file-manager-container {
    max-width: 1400px;
}

.file-manager-layout {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.file-listing-section {
    flex: 3;
    min-height: 600px;
}

.subdomain-info-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.breadcrumb-item {
    color: #007AFF;
    cursor: pointer;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #0051D5;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #6c757d;
    margin: 0 5px;
}

/* File Toolbar */
.file-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #dee2e6;
    margin: 0 5px;
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn svg {
    margin-right: 6px;
}

/* File Table */
.file-table-container {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.file-table thead {
    background: #f8f9fa;
}

.file-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
}

.file-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.file-table tbody tr:hover {
    background: #f8f9fa;
}

.file-row-clickable {
    cursor: pointer;
}

.file-name-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name-clickable {
    color: #007AFF;
    cursor: pointer;
}

.file-name-clickable:hover {
    color: #0051D5;
}

.file-name-text {
    font-weight: 500;
}

.file-size {
    color: #6c757d;
    font-size: 13px;
}

.file-date {
    color: #6c757d;
    font-size: 13px;
}

.file-actions {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #e9ecef;
    color: #495057;
}

/* Column widths */
.file-name-col {
    width: 40%;
}

.file-size-col {
    width: 15%;
}

.file-date-col {
    width: 25%;
}

.file-actions-col {
    width: 20%;
}

/* Backup Tooltip Styles */
.backup-tooltip,
.backup-tooltip-light {
    position: absolute;
    z-index: 9999;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    max-width: 300px;
    animation: tooltipFadeIn 0.2s ease;
    pointer-events: auto;
}

.backup-tooltip {
    border: 2px solid #dc3545;
}

.backup-tooltip-light {
    border: 1px solid #ddd;
}

.backup-tooltip::after,
.backup-tooltip-light::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.backup-tooltip::before,
.backup-tooltip-light::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
}

.backup-tooltip::before {
    border-top: 10px solid #dc3545;
}

.backup-tooltip-light::before {
    border-top: 10px solid #ddd;
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tooltip-content p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

.tooltip-btn {
    padding: 6px 12px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
    align-self: flex-start;
}

.tooltip-btn:hover {
    background: #0051D5;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Make No Backup pills interactive */
[data-has-tooltip="backup"] {
    cursor: help;
    position: relative;
}

[data-has-tooltip="backup"]:hover {
    opacity: 0.9;
}

/* Sidebar Info Cards */
.info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.info-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    font-weight: 500;
    color: #6c757d;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.btn-full {
    width: 100%;
    margin-bottom: 10px;
    justify-content: flex-start;
    text-align: left;
}

.btn-full:last-child {
    margin-bottom: 0;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    padding: 10px 16px;
    background: #007AFF;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-action:hover {
    background: #0056b3;
}

.btn-action svg {
    flex-shrink: 0;
}

/* Software Installation - Compact Grid */
.sw-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.btn-sw-install {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sw-install:hover {
    background: white;
    border-color: #007AFF;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
    transform: translateY(-2px);
}

.btn-sw-install svg {
    flex-shrink: 0;
}

.btn-sw-install span {
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .sw-compact-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .btn-sw-install {
        padding: 12px 8px;
        font-size: 12px;
    }

    .btn-sw-install svg {
        width: 16px;
        height: 16px;
    }
}

/* Stats */
.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.stats-item:last-child {
    margin-bottom: 0;
}

.stats-label {
    color: #6c757d;
}

.stats-value {
    font-weight: 600;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* File Manager Responsive */
    .file-manager-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .file-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .file-table {
        font-size: 13px;
    }
    
    .file-table th,
    .file-table td {
        padding: 8px 10px;
    }
    
    .file-name-col {
        width: 50%;
    }
    
    .file-size-col,
    .file-date-col {
        width: 25%;
    }
    
    .file-actions-col {
        width: 0%;
        padding: 0;
    }
    
    .file-actions {
        display: none;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .select-action,
    .btn-primary {
        width: 100%;
    }

    .filters-bar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .select-action {
        width: 100%;
        order: -1;
    }

    .search-box {
        flex: 1 1 200px;
        max-width: 100%;
    }
    
    .filter-options {
        width: 100%;
        justify-content: space-between;
    }

    .table-container {
        overflow-x: auto;
    }

    .domains-table {
        min-width: 800px;
    }

    .services-list {
        max-width: 200px;
    }
}

/* ========================================================================
   Global App Sidebar (left navigation on index.html)
   ======================================================================== */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 130px;
    background: #3a3a3a;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 0 12px;
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 18px;
    text-decoration: none;
    color: #f5f5f5;
}

.app-sidebar-brand-icon {
    color: #f5f5f5;
}

.app-sidebar-brand-tag {
    background: #5a5a5a;
    color: #f5f5f5;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.app-sidebar-brand.active .app-sidebar-brand-tag {
    background: #2f8fff;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(47, 143, 255, 0.25);
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
}

.app-sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px;
    color: #f5f5f5;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
}

.app-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.app-sidebar-item.active {
    background: #2f4a66;
    border-left-color: #2f8fff;
    color: #ffffff;
}

.app-sidebar-icon {
    color: inherit;
}

.app-sidebar-label {
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-sidebar-badge {
    background: #6a6a6a;
    color: #f5f5f5;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.4;
}

.app-sidebar-item.active .app-sidebar-badge {
    background: rgba(255, 255, 255, 0.18);
}

.app-sidebar-support {
    margin-top: auto;
    color: #6cb8ff;
}

.app-sidebar-support:hover {
    color: #9bd0ff;
}

/* ========================================================================
   Installed Applications — Vercel-inspired cards
   ======================================================================== */
.apps-section {
    margin: 0 0 30px;
    padding: 0 20px;
}

.apps-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.apps-section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.apps-section-link {
    font-size: 13px;
    color: #6c7480;
    text-decoration: none;
}

.apps-section-link:hover {
    color: #1a1a1a;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.app-card {
    display: block;
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.app-card:hover {
    border-color: #cfd4dc;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.app-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-card-avatar--n8n {
    background: #ea4b71;
    color: #ffffff;
}

.app-card-avatar--openclaw {
    background: #f5a524;
    color: #0a0a0a;
}

.app-card-meta {
    flex: 1;
    min-width: 0;
}

.app-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-subtitle {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: transparent;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-card-icon-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.app-card-icon-btn:last-child {
    border: none;
}

.app-card-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 5px 10px;
    background: #f3f4f6;
    border-radius: 999px;
    font-size: 12px;
    color: #374151;
}

.app-card-source svg {
    color: #111827;
}

.app-card-status {
    margin-top: 14px;
}

.app-card-status-line {
    font-size: 14px;
    color: #111827;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-card-status-meta {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.app-card-branch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.app-card-dot {
    color: #cbd5e1;
}

@media (max-width: 768px) {
    .apps-section {
        padding: 0 10px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================
   Simple domain list (dashboard)
   ======================================================================== */
.dashboard-section {
    margin: 0 0 30px;
    padding: 0 20px;
}

.dashboard-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}

.dashboard-section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.dashboard-section-link {
    font-size: 13px;
    color: #6c7480;
    text-decoration: none;
}

.dashboard-section-link:hover {
    color: #1a1a1a;
}

.domain-simple-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.domain-simple-item + .domain-simple-item {
    border-top: 1px solid #f1f3f5;
}

.domain-simple-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.domain-simple-link:hover {
    background: #f9fafb;
}

.domain-simple-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.domain-simple-meta {
    font-size: 12px;
    color: #6b7280;
}

.domain-simple-arrow {
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
}

@media (max-width: 768px) {
    .dashboard-section {
        padding: 0 10px;
    }
}

/* Adjust main container to make room for the fixed sidebar on index.html */
body:has(.app-sidebar) .container {
    margin-left: 130px;
    max-width: none;
    padding-left: 30px;
    padding-right: 30px;
}

@media (max-width: 768px) {
    .app-sidebar {
        width: 64px;
        padding: 10px 0;
    }

    .app-sidebar-label,
    .app-sidebar-brand-tag {
        display: none;
    }

    .app-sidebar-item {
        padding: 12px 4px;
    }

    body:has(.app-sidebar) .container {
        margin-left: 64px;
        padding-left: 16px;
        padding-right: 16px;
    }
}