/* NMAP Scanner - Main Stylesheet */

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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #2980b9;
    --light-bg: #ecf0f1;
    --dark-bg: #2c3e50;
    --border-color: #bdc3c7;
    --text-color: #333;
    --light-text: #666;
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: #f5f5f5;
    padding-top: 130px;
    padding-bottom: 90px;
}

body.login-page {
    padding-top: 0;
    padding-bottom: 0;
}

body > *:not(.footer) {
    flex-shrink: 0;
}

body > *:not(nav):not(.footer) {
    flex-grow: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wide-container {
    max-width: 1600px;
}

/* Hide detailed host information section */
.hosts-details-section {
    display: none;
}

/* Table Filters */
.table-filters {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.scan-dropdown {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 180px;
}

.scan-dropdown:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-box {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Compact inline filter layout */
.table-filters-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 6px;
    flex-wrap: wrap;
}

.search-box-compact {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.3s;
    min-width: 280px;
}

.search-box-compact:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-select-compact {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select-compact:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Filter Dropdown Styles (for hosts.php filters) */
.filter-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.filter-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    color: var(--text-color);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    white-space: nowrap;
    min-width: 140px;
}

.filter-dropdown-toggle:hover {
    border-color: #95a5a6;
    background-color: #fafafa;
}

.filter-dropdown-toggle:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-dropdown-toggle .dropdown-arrow {
    display: inline-block;
    font-size: 10px;
    transition: transform 0.3s;
    margin-left: 4px;
}

.filter-dropdown-wrapper:has(.filter-dropdown-menu.active) .dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, box-shadow 0.3s, visibility 0.3s;
    z-index: 1000;
    box-shadow: none;
    visibility: hidden;
    min-width: 200px;
}

.filter-dropdown-menu.active {
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    visibility: visible;
}

/* Export Dropdown Styles */
.export-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.export-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    min-width: 130px;
    z-index: 1001;
    display: none;
}

.export-dropdown-menu.active {
    display: block;
}

.export-dropdown-item {
    display: block;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
}

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

.export-dropdown-item i {
    margin-right: 6px;
}

.filter-option {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    display: block;
    width: 100%;
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--text-color);
    margin: 0;
    width: 100% !important;
    min-width: 0;
}

.filter-option .filter-checkbox-label:hover {
    background-color: #f5f5f5;
}

.filter-checkbox {
    flex-shrink: 0 !important;
    margin-right: 8px !important;
    cursor: pointer !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    vertical-align: middle !important;
}

.filter-checkbox-label span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sortable Table Headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 60px !important;
}

th.sortable:hover {
    background-color: #e8e8e8;
}

.sort-buttons {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.sort-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 2px 3px;
    cursor: pointer;
    font-size: 10px;
    border-radius: 0px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0.8;
    min-width: 16px;
    min-height: 12px;
}

.sort-btn i {
    font-size: 10px;
}

.sort-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.sort-btn.active {
    color: white;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-logo {
    max-height: 100px;
    width: auto;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo-link:hover {
    opacity: 0.8;
}

.navbar-brand h1 {
    display: none;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    align-items: center;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 0 4px;
}

.navbar-menu a i {
    font-size: 14px;
    opacity: 0.8;
}

.navbar-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar-menu a:hover i,
.navbar-menu a.active i {
    opacity: 1;
}

.navbar-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
}

/* User menu dropdown */
.navbar-user-item {
    position: relative;
}

.navbar-user-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.navbar-user-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-user-button.has-submenu::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
}

.navbar-submenu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    min-width: 150px;
    margin-top: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1001;
}

.navbar-user-item:hover .navbar-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.navbar-submenu li {
    margin: 0;
}

.navbar-submenu a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-submenu a:last-child {
    border-bottom: none;
}

.navbar-submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

/* Nested submenu support */
.navbar-submenu li {
    position: relative;
}

.navbar-submenu li.has-submenu > a::after {
    content: '▶';
    font-size: 9px;
    margin-left: auto;
    padding-left: 8px;
}

.navbar-submenu .navbar-nested-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background-color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s;
    z-index: 1002;
}

.navbar-submenu li.has-submenu:hover .navbar-nested-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.navbar-nested-submenu a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-nested-submenu a:last-child {
    border-bottom: none;
}

.navbar-nested-submenu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

/* Main Content */
main {
    flex: 1;
}

.page-header-with-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    margin-bottom: 15px;
    margin-top: 0;
}

/* Unified Page Header Theme */
.page-header {
    flex: 1;
    padding: 0;
    border: none;
    margin: 0 0 25px 0;
}

.page-header-with-stats .page-header {
    margin: 0;
}

.page-header-with-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 32px;
    margin: 0;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: 0.3px;
}

.page-header h2 i {
    font-size: 36px;
    background: linear-gradient(135deg, var(--secondary-color), #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.9;
}


.welcome-badge {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.1));
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.welcome-badge i {
    font-size: 18px;
    color: var(--secondary-color);
}

.welcome-badge strong {
    color: var(--secondary-color);
    font-weight: 600;
}

.page-header p {
    color: var(--light-text);
    font-size: 14px;
}

/* Sections */
.section {
    background: white;
    border-radius: 6px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

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

.section-header div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: none;
}

.section h4 {
    font-size: 16px;
    margin: 15px 0 10px 0;
}

.section h5 {
    font-size: 14px;
    margin: 15px 0 10px 0;
    color: var(--light-text);
}

/* Forms */
.form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control,
.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--light-text);
}

.form-hint strong {
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: var(--light-bg);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #bdc3c7;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    background-color: #1f618d;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #fadbd8;
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.alert-success {
    background-color: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.alert-info {
    background-color: #d6eaf8;
    color: #2980b9;
    border-left: 4px solid #2980b9;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background-color: var(--light-bg);
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.table th:hover {
    background-color: #d5dbdb;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: #dfe6f0;
    transition: background-color 0.2s ease;
}

.table code {
    background-color: var(--light-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* IP Address badges in all asset tables - pill style */
.assets-table code {
    display: inline-block;
    width: 100px;
    text-align: center;
    background-color: #f0f0f0;
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-family: inherit;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-box {
    background: var(--primary-color);
    color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 350px;
    width: 100%;
    height: auto;
}

.login-box h1 {
    display: none;
}

.subtitle {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 30px;
    font-size: 14px;
}

.login-box .subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box .form-group label {
    color: white;
}

.password-input-wrapper {
    position: relative;
    display: block;
}

.password-input-wrapper input {
    padding-right: 45px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: opacity 0.2s;
}

.password-toggle:hover {
    opacity: 0.7;
}

.password-toggle:focus {
    outline: none;
}

.eye-icon {
    display: inline-block;
}

.divider {
    border: none;
    border-top: 1px solid var(--light-bg);
    margin: 20px 0;
}

.info-text {
    font-size: 13px;
    text-align: center;
    color: #999;
    margin: 10px 0;
}

.info-text.small {
    font-size: 12px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-stats-totals {
    grid-template-columns: repeat(3, 1fr);
}

.dashboard-stats-certs {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
}

.stat-card h3 {
    font-size: 36px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    border: none;
    padding: 0;
}

.stat-card p {
    color: var(--light-text);
    font-size: 14px;
}

.stat-card-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 18px;
    opacity: 0.5;
}

.stat-danger .stat-card-icon {
    color: #e74c3c;
}

.stat-success .stat-card-icon {
    color: #27ae60;
}

.stat-warning .stat-card-icon {
    color: #f39c12;
}

/* History Page Layout */
.history-layout {
    display: block;
    width: 100%;
}

.scan-list {
    padding: 20px !important;
}

.file-list {
    list-style: none;
}

.file-list li {
    margin-bottom: 8px;
}

.file-list li.selected .file-link {
    background-color: var(--secondary-color);
    color: white;
}

.file-link {
    display: block;
    padding: 10px 12px;
    background-color: var(--light-bg);
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.file-link:hover {
    background-color: #d5dbdb;
    border-left-color: var(--secondary-color);
}

.file-type {
    display: inline-block;
    font-weight: 600;
    color: var(--secondary-color);
}

.file-time {
    display: block;
    font-size: 11px;
    color: var(--light-text);
    margin-top: 4px;
}

.file-link:hover .file-time {
    color: var(--text-color);
}

.scan-results {
    padding: 20px !important;
}

.results-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.results-header-container h3 {
    margin: 0;
    border: none;
    padding: 0;
    font-size: 18px;
    flex: 1;
}

.results-header-container .timestamp {
    color: var(--light-text);
    font-size: 18px;
    margin: 0;
    white-space: nowrap;
}

.page-header-with-stats .results-summary {
    display: flex;
    gap: 15px;
    padding: 0;
    flex-shrink: 0;
    align-items: flex-end;
}

.summary-stat {
    background-color: var(--light-bg);
    padding: 6px 10px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-stat h4 {
    font-size: 21px;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: var(--secondary-color);
}

.summary-stat p {
    margin: 0;
    font-size: 12px;
    color: var(--light-text);
}


/* Hosts Container */
.hosts-container {
    display: grid;
    gap: 20px;
}

.host-card {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 20px;
    background-color: #fafafa;
}

.host-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.host-ip {
    font-size: 16px;
    margin: 0;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.host-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.host-status.status-up {
    background-color: #d5f4e6;
    color: #27ae60;
}

.host-status.status-down {
    background-color: #fadbd8;
    color: #e74c3c;
}

.host-info p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.os-accuracy {
    color: var(--light-text);
    font-size: 12px;
}

.ports-section {
    margin-top: 20px;
}

.ports-section h5 {
    margin-top: 0;
}

.ports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.ports-table thead {
    background-color: var(--light-bg);
}

.ports-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.ports-table th:hover {
    background-color: #d5dbdb;
}

.ports-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
}

.ports-table tbody tr:nth-child(odd) {
    background-color: #f0f2f5;
}

.ports-table tbody tr:nth-child(even) {
    background-color: white;
}

.ports-table tbody tr:hover {
    background-color: #d9e1f2;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.port-state {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.port-state.state-open {
    background-color: #d5f4e6;
    color: #27ae60;
}

.port-state.state-closed {
    background-color: #fadbd8;
    color: #e74c3c;
}

.port-state.state-filtered {
    background-color: #fef5e7;
    color: #f39c12;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-text);
    font-size: 14px;
}

/* Quick Links */
.quick-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.quick-links li a {
    display: block;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 4px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.quick-links li a:hover {
    background-color: var(--light-bg);
    border-left-color: var(--secondary-color);
}

/* Multiple Targets Badge */
.target-multiple {
    display: inline-block;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.1));
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 500;
    cursor: help;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.target-multiple:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15), rgba(41, 128, 185, 0.15));
    border-color: rgba(52, 152, 219, 0.5);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.target-multiple strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Info Box */
.info-box {
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid var(--secondary-color);
}

.info-box h4 {
    margin-top: 15px;
    color: var(--text-color);
}

.info-box h4:first-child {
    margin-top: 0;
}

.info-box p {
    color: var(--light-text);
    font-size: 13px;
    line-height: 1.6;
    margin: 8px 0;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 12px;
    flex-shrink: 0;
    width: 100%;
    z-index: 999;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        gap: 15px;
        font-size: 14px;
    }

    .history-layout {
        display: block;
    }

    .scan-list {
        display: none;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .form {
        max-width: 100%;
    }

    .page-header h2 {
        font-size: 24px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px;
    }
}

/* Code blocks */
code {
    background-color: var(--light-bg);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Assets Table */
.assets-table-section {
    margin-bottom: 40px;
    margin-top: 0;
}

.assets-table {
    width: 100%;
    table-layout: auto;
    border-top: none;
    margin-top: 15px;
}

.assets-table th {
    background-color: #34495e;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.assets-table th:hover {
    background-color: #2c3e50;
}

.assets-table tbody tr {
    transition: background-color 0.2s;
}

.assets-table tbody tr:nth-child(odd) {
    background-color: #f0f2f5;
}

.assets-table tbody tr:nth-child(even) {
    background-color: white;
}

.assets-table tbody tr:hover {
    background-color: #d9e1f2;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 80px;
    text-align: center;
}

.status-badge.status-up {
    background-color: #d5f4e6;
    color: #27ae60;
}

.status-badge.status-down {
    background-color: #fadbd8;
    color: #e74c3c;
}

.status-badge.status-unknown {
    background-color: #f2f3f4;
    color: #7f8c8d;
}

.port-count {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 12px;
}

.hosts-details-section {
    margin-top: 40px;
}

.file-target {
    display: block;
    font-size: 11px;
    color: var(--light-text);
    margin-top: 2px;
}

/* Certificate Status Badges */
.cert-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

.cert-status-valid {
    background-color: #d4edda;
    color: #155724;
}

.cert-status-expiring {
    background-color: #fff3cd;
    color: #856404;
}

.cert-status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.expiry-text {
    font-weight: 500;
    font-size: 13px;
    display: inline-block;
}

.expiry-valid {
    color: #28a745;
}

.expiry-expiring {
    color: #ffc107;
    font-weight: 600;
}

.expiry-expired {
    color: #dc3545;
    font-weight: 600;
}

tr.cert-row-expired {
    background-color: #fff5f5 !important;
}

tr.cert-row-expiring {
    background-color: #fffdf0 !important;
}

tr.cert-row-valid {
    background-color: #f0fdf4 !important;
}

/* Modal for certificate details */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 0;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.detail-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.detail-table tr:last-child {
    border-bottom: none;
}

.detail-table td {
    padding: 12px;
}

.detail-table td:first-child {
    font-weight: 600;
    background-color: #f9f9f9;
    width: 120px;
}

.detail-table td:last-child {
    word-break: break-word;
}

/* Stat cards for certificate statistics */
.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.stat-card p {
    margin: 0;
    font-size: 14px;
    color: var(--light-text);
}

.stat-card.stat-success h3 {
    color: #28a745;
}

.stat-card.stat-warning h3 {
    color: #ffc107;
}

.stat-card.stat-danger h3 {
    color: #dc3545;
}

/* Custom Subnet Dropdown */
.subnet-dropdown-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.subnet-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-width: 500px;
    padding: 10px 15px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    background-color: #fff;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.subnet-dropdown-toggle:hover {
    border-color: #95a5a6;
    background-color: #fafafa;
}

.subnet-dropdown-toggle:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.dropdown-arrow {
    display: inline-block;
    font-size: 12px;
    transition: transform 0.3s;
}

.subnet-dropdown-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

.subnet-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #bdc3c7;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, box-shadow 0.3s, visibility 0.3s;
    z-index: 1000;
    box-shadow: none;
    visibility: hidden;
}

.subnet-dropdown-menu.active {
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    visibility: visible;
}

.subnet-option {
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    display: block;
    width: 100%;
    min-width: 0;
}

.subnet-option .subnet-checkbox-label {
    padding: 8px 15px;
}

.subnet-option:last-child {
    border-bottom: none;
}

.subnet-checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
    width: 100% !important;
    min-width: 0;
}

.subnet-option .subnet-checkbox-label:hover {
    background-color: #f5f5f5;
}

.subnet-checkbox {
    flex-shrink: 0 !important;
    margin-right: 10px !important;
    cursor: pointer !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    vertical-align: middle !important;
}

.subnet-checkbox-label span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Read-only input styling */
input[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
    color: #666;
}

input[readonly]::placeholder {
    color: #999;
}

/* Cipher Strength Badges */
.cipher-strength {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
    text-transform: capitalize;
    min-width: 75px;
    text-align: center;
}

.cipher-strength.strength-strong {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cipher-strength.strength-medium {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.cipher-strength.strength-weak {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cipher-strength.strength-insecure {
    background-color: #f5c6cb;
    color: #721c24;
    border: 1px solid #f1b0b7;
    font-weight: 600;
}

/* Cipher row row highlighting for weakness levels */
.cipher-row-weak,
.cipher-row-insecure {
    background-color: #ffebee !important;
}

.cipher-row-weak:hover,
.cipher-row-insecure:hover {
    background-color: #ffcdd2 !important;
}

/* Badge styles for forward secret indicator */
.badge-success {
    display: inline-block;
    padding: 3px 8px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-danger {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success i,
.badge-danger i {
    margin-right: 4px;
}

/* Dashboard stat card styling for ciphers */
.dashboard-stats-ciphers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Remove background colors from cipher stat cards */
.dashboard-stats-ciphers .stat-card {
    background-color: white !important;
    background: white !important;
}

.dashboard-stats-ciphers .stat-success {
    background: white !important;
    border-color: transparent;
}

.stat-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #c3e6cb;
}

.stat-success h3 {
    color: #155724;
}
