/* Modern & Minimalist UI - Heroicons + Tailwind-inspired */

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

:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #6b7280;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f9fafb;
    --bg-alt: #f3f4f6;
    --border: #e5e7eb;
    --text: #111827;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

/* ============= NAVBAR ============= */
.navbar-modern {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-modern .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.navbar-brand-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.navbar-brand-modern svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
}

.navbar-nav-modern {
    display: flex;
    gap: 2rem;
    list-style: none;
    flex: 1;
    justify-content: center;
}

.nav-item-modern a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-item-modern a:hover,
.nav-item-modern a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-item-modern svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.navbar-status {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.online {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.user-info {
    color: var(--text);
    font-weight: 500;
}

/* ============= CARDS ============= */
.card-modern {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.card-modern:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.card-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-title-modern {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title-modern svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
}

/* ============= KPI CARDS ============= */
.kpi-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-card.primary {
    border-left: 4px solid var(--primary);
}

.kpi-card.success {
    border-left: 4px solid var(--success);
}

.kpi-card.warning {
    border-left: 4px solid var(--warning);
}

.kpi-card.danger {
    border-left: 4px solid var(--danger);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--text);
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.kpi-icon.primary {
    background: rgba(59, 130, 246, 0.1);
}

.kpi-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
    fill: none;
}

/* ============= BUTTONS ============= */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    text-decoration: none;
}

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

.btn-modern.primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-modern.secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-modern.secondary:hover {
    background: var(--border);
}

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

.btn-modern.danger:hover {
    background: #dc2626;
}

.btn-modern svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ============= TABLES ============= */
.table-modern {
    width: 100%;
    border-collapse: collapse;
}

.table-modern thead {
    background: var(--bg-alt);
    border-bottom: 2px solid var(--border);
}

.table-modern th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-modern tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.table-modern tbody tr:hover {
    background: var(--bg);
}

.table-modern td {
    padding: 1rem;
    color: var(--text);
}

.table-modern .badge-modern {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.table-modern .badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.table-modern .badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.table-modern .badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ============= FORMS ============= */
.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.875rem;
}

.form-input-modern,
.form-select-modern {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-input-modern:focus,
.form-select-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============= GRID ============= */
.grid-modern {
    display: grid;
    gap: 1.5rem;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ============= CONTAINER ============= */
.container-modern {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-wrapper {
    padding: 2rem 0;
}

/* ============= FILTERS ============= */
.filters-modern {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filters-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.filters-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.filters-header svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    fill: none;
    stroke-width: 2;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
}

/* ============= PAGINATION ============= */
.pagination-modern {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-modern a,
.pagination-modern span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    font-weight: 500;
}

.pagination-modern a:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    color: var(--primary);
}

.pagination-modern .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
    .navbar-nav-modern {
        gap: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .navbar-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .card-modern {
        padding: 1rem;
    }

    .table-modern th,
    .table-modern td {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

/* ============= UTILITIES ============= */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
