/* Blueonnix Security Center & Firewall Rules - Solid Minimal Dark Theme */
.security-container {
    padding: 1.5rem;
    color: var(--text-main, #f4f4f5);
    background-color: var(--bg-main, #09090b);
    min-height: 100%;
}

.security-score-card {
    background: #18181b;
    border: 1px solid #27272a;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.security-score-badge {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: monospace;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.security-score-badge.high { color: #22c55e; }
.security-score-badge.medium { color: #eab308; }
.security-score-badge.low { color: #ef4444; }

.security-subnav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #27272a;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.security-subnav-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted, #a1a1aa);
    padding: 0.65rem 1.15rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
}

.security-subnav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}

.security-subnav-btn.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.sec-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sec-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sec-search-input {
    background: #18181b;
    border: 1px solid #27272a;
    color: #f4f4f5;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 0 !important;
    outline: none;
    min-width: 240px;
    transition: border-color 0.15s ease;
}

.sec-search-input:focus {
    border-color: #3b82f6;
}

.sec-table-card {
    background: #121214;
    border: 1px solid #27272a;
    border-radius: 0 !important;
    overflow-x: auto;
}

.sec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.sec-table th {
    background: #18181b;
    color: var(--text-muted, #a1a1aa);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #27272a;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.sec-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #27272a;
    vertical-align: middle;
}

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

.sec-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.port-badge {
    font-family: monospace;
    font-weight: 700;
    color: #fff;
    background: #27272a;
    padding: 0.2rem 0.5rem;
    border-radius: 0 !important;
}

.proto-badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border: 1px solid #3f3f46;
    border-radius: 0 !important;
    color: #d4d4d8;
}

.action-pill {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 0 !important;
    letter-spacing: 0.04em;
}

.action-pill.allow {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.action-pill.drop {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Action Buttons inside Table */
.btn {
    border-radius: 0 !important;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.28rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-secondary {
    background: #27272a;
    color: #f4f4f5;
    border-color: #3f3f46;
}

.btn-secondary:hover {
    background: #3f3f46;
    color: #ffffff;
    border-color: #52525b;
}

/* Solid Modal Themes (Zero Glitch / Solid Geometry) */
#open-port-modal,
#add-ip-rule-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#open-port-modal.open,
#add-ip-rule-modal.open {
    display: flex !important;
}

#open-port-modal .modal,
#add-ip-rule-modal .modal {
    background: #18181b !important;
    border: 1px solid #27272a !important;
    border-radius: 0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.95) !important;
    color: #f4f4f5 !important;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

#open-port-modal .modal-head,
#add-ip-rule-modal .modal-head {
    background: #121214 !important;
    border-bottom: 1px solid #27272a !important;
    border-radius: 0 !important;
    padding: 1.15rem 1.5rem !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#open-port-modal .modal-body,
#add-ip-rule-modal .modal-body {
    background: #18181b !important;
    padding: 1.5rem !important;
}

.sec-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #121214 !important;
    border-top: 1px solid #27272a !important;
}

.sec-modal-cancel-btn {
    background: transparent;
    border: 1px solid #3f3f46;
    color: #d4d4d8;
    padding: 0.55rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 !important;
    transition: all 0.15s ease;
}

.sec-modal-cancel-btn:hover {
    background: #27272a;
    color: #ffffff;
    border-color: #52525b;
}

.sec-modal-submit-btn {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: #ffffff;
    padding: 0.55rem 1.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0 !important;
    transition: all 0.15s ease;
}

.sec-modal-submit-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}
