/**
 * TablasDBWP - Main Stylesheet
 */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* General */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background: #f1f3f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    color: #d63384;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
}

.hero h1 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
    background: #f8f9fa;
}

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

/* List groups */
.list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0 !important;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Search */
.input-group-lg .form-control {
    font-size: 1.1rem;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
}

/* Stats */
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

/* Utilities */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero .lead {
        font-size: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* Code blocks */
pre {
    background: #f1f3f5;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

pre code {
    background: transparent;
    padding: 0;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Table detail page */
.table-name-code {
    font-size: 1.1em;
    background: #e8f0fe;
    color: #1a56db;
    padding: 0.3em 0.6em;
}

.table-stats-row > div {
    min-width: 60px;
}

.table-info-dl dt {
    color: #6c757d;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.75rem;
}

.table-info-dl dt:first-child {
    margin-top: 0;
}

.table-info-dl dd {
    margin-bottom: 0;
}

/* Plugin cards in table detail */
.card-plugin-item {
    border: 1px solid #e9ecef;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.card-plugin-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.card-plugin-item .card-body {
    color: #212529;
}

.plugin-item-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.plugin-confidence-group h6 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Confidence bars */
.confidence-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    border-radius: 4px;
    min-width: 4px;
}

/* Column structure table */
.column-name {
    font-weight: 600;
    color: #1a56db;
    background: #e8f0fe;
}

/* Border dashed card */
.border-dashed {
    border: 2px dashed #dee2e6 !important;
    box-shadow: none;
}

.border-dashed:hover {
    border-color: var(--primary-color) !important;
    box-shadow: none;
}

/* Relation Graph */
#relation-graph {
    border-top: 1px solid #e9ecef;
    background: #fafbfc;
}

/* Options/Autoload table */
.option-name {
    font-weight: 600;
    color: #6f42c1;
    background: #f3eefe;
    font-size: 0.85em;
}

/* Progress bar in options */
.progress {
    border-radius: 6px;
}

/* Graph card */
.card-footer.small {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}
