/**
 * Security Tools - Frontend Styles
 */

.security-tools-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.st-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.st-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* User Info */
.st-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.st-vip-badge {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.st-regular {
    color: #666;
    font-size: 14px;
}

/* Quota Info */
.st-quota-info {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 8px;
}

.st-quota-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.st-quota-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.st-quota-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* Tools Grid */
.st-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.st-tool-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.st-tool-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.st-tool-card.st-tool-disabled {
    background: #f9f9f9;
    opacity: 0.7;
}

.st-tool-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.st-tool-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
}

.st-tool-card p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.st-vip-hint {
    margin-top: 8px;
    font-size: 12px;
}

.st-vip-hint a {
    color: #ffb347;
}

/* Buttons */
.st-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.st-btn-primary {
    background: #4a90d9;
    color: #fff;
}

.st-btn-primary:hover {
    background: #357abd;
}

.st-btn-vip {
    background: linear-gradient(135deg, #ffd700, #ffb347);
    color: #333;
}

.st-btn-vip:hover {
    background: linear-gradient(135deg, #ffb347, #ffd700);
}

.st-btn-disabled,
.st-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

.st-btn-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.st-btn-close:hover {
    color: #333;
}

/* Tool Panels */
.st-tool-panels {
    margin-top: 24px;
}

.st-tool-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

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

.st-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.st-panel-content {
    padding: 20px;
}

/* Forms */
.st-form-group {
    margin-bottom: 16px;
}

.st-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.st-input,
.st-select,
.st-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.st-input:focus,
.st-select:focus,
.st-textarea:focus {
    outline: none;
    border-color: #4a90d9;
}

.st-textarea {
    resize: vertical;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
}

/* Tabs */
.st-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 2px solid #e0e0e0;
}

.st-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
}

.st-tab.active {
    color: #4a90d9;
    font-weight: 500;
}

.st-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #4a90d9;
}

/* Filters */
.st-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.st-filters .st-input,
.st-filters .st-select {
    flex: 1;
    min-width: 150px;
}

/* Result Areas */
.st-result {
    margin-top: 20px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #4a90d9;
}

.st-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.st-result-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.st-result-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ddd;
    color: #666;
    font-size: 12px;
}

/* Risk Badges */
.st-risk-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.st-risk-critical {
    background: #ff4757;
    color: #fff;
}

.st-risk-high {
    background: #ff7f50;
    color: #fff;
}

.st-risk-medium {
    background: #ffa502;
    color: #333;
}

.st-risk-low {
    background: #2ed573;
    color: #fff;
}

.st-risk-none {
    background: #a4b0be;
    color: #fff;
}

/* Vulnerability Items */
.st-vulns {
    margin-top: 16px;
}

.st-vulns h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #333;
}

.st-vuln-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
}

.st-vuln-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.st-vuln-type {
    font-weight: 600;
    color: #333;
}

.st-vuln-severity {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.st-severity-critical {
    background: #ff4757;
    color: #fff;
}

.st-severity-high {
    background: #ff7f50;
    color: #fff;
}

.st-severity-medium {
    background: #ffa502;
    color: #333;
}

.st-severity-low {
    background: #2ed573;
    color: #fff;
}

.st-vuln-location {
    margin-bottom: 8px;
}

.st-vuln-location code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.st-vuln-desc {
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
}

.st-vuln-fix {
    background: #e8f5e9;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #2e7d32;
}

.st-no-vulns {
    text-align: center;
    padding: 20px;
    color: #2e7d32;
    background: #e8f5e9;
    border-radius: 6px;
}

/* Secure Coding Tips */
.st-tips {
    margin-top: 16px;
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
}

.st-tips h5 {
    margin: 0 0 8px 0;
    color: #1565c0;
}

.st-tips ul {
    margin: 0;
    padding-left: 20px;
}

.st-tips li {
    color: #333;
    font-size: 13px;
    margin-bottom: 4px;
}

/* Phishing Result */
.st-phishing-verdict {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.st-phishing-label {
    font-weight: 500;
}

.st-phishing-value {
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
}

.st-phishing-yes {
    background: #ff4757;
    color: #fff;
}

.st-phishing-no {
    background: #2ed573;
    color: #fff;
}

.st-confidence {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.st-confidence-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.st-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ed573, #ffa502, #ff4757);
    transition: width 0.3s ease;
}

.st-threat-level {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    margin-bottom: 12px;
}

.st-threat-critical {
    background: #ff4757;
    color: #fff;
}

.st-threat-high {
    background: #ff7f50;
    color: #fff;
}

.st-threat-medium {
    background: #ffa502;
    color: #333;
}

.st-threat-low {
    background: #2ed573;
    color: #fff;
}

.st-threat-none {
    background: #a4b0be;
    color: #fff;
}

/* Indicators */
.st-indicators {
    margin-top: 12px;
}

.st-indicators h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.st-indicator {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.st-ind-type {
    font-weight: 600;
    color: #333;
}

.st-ind-severity {
    float: right;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.st-ind-sev-critical {
    background: #ff4757;
    color: #fff;
}

.st-ind-sev-high {
    background: #ff7f50;
    color: #fff;
}

.st-ind-sev-medium {
    background: #ffa502;
    color: #333;
}

.st-ind-sev-low {
    background: #2ed573;
    color: #fff;
}

.st-ind-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

.st-ind-evidence {
    margin-top: 4px;
}

.st-ind-evidence code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* Vulnerability List */
.st-vuln-list {
    max-height: 500px;
    overflow-y: auto;
}

.st-vuln-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.st-vuln-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #4a90d9;
}

.st-vuln-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.st-vuln-cve {
    font-weight: 600;
    color: #1565c0;
}

.st-vuln-card .st-vuln-severity {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.st-vuln-sev-critical {
    background: #ff4757;
    color: #fff;
}

.st-vuln-sev-high {
    background: #ff7f50;
    color: #fff;
}

.st-vuln-sev-medium {
    background: #ffa502;
    color: #333;
}

.st-vuln-sev-low {
    background: #2ed573;
    color: #fff;
}

.st-vuln-card-title {
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.st-vuln-card-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.st-vuln-cvss {
    font-weight: 500;
}

/* Pagination */
.st-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.st-pagination button {
    padding: 8px 16px;
    background: #4a90d9;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.st-pagination button:hover {
    background: #357abd;
}

.st-pagination span {
    color: #666;
    font-size: 14px;
}

/* Notice */
.security-tools-notice {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    text-align: center;
    color: #856404;
}

/* Loading & Error States */
.st-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.st-no-data {
    text-align: center;
    padding: 40px;
    color: #999;
}

.st-error {
    color: #ff4757;
    padding: 12px;
    background: #ffeaea;
    border-radius: 6px;
}

/* Warning */
.st-warning {
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    margin-bottom: 16px;
}

/* Test Info */
.st-test-info {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
}

.st-test-info p {
    margin: 4px 0;
}

.st-test-info strong {
    display: inline-block;
    width: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .security-tools-panel {
        padding: 12px;
    }

    .st-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .st-quota-info {
        flex-direction: column;
        gap: 12px;
    }

    .st-tools-grid {
        grid-template-columns: 1fr;
    }

    .st-filters {
        flex-direction: column;
    }

    .st-filters .st-input,
    .st-filters .st-select {
        min-width: 100%;
    }
}