/* ============================================
   DJ CUSTOM - Dashboard Styles
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #00E5A0;
    --accent-light: #33EAAF;
    --accent-dark: #00CC8E;
    --accent-glow: rgba(0, 229, 160, 0.3);
    --accent-subtle: rgba(0, 229, 160, 0.08);
    --gradient-accent: linear-gradient(135deg, #00E5A0, #00B4D8);
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a28;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --bg-glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-tertiary: #6b6b80;
    --border-color: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.05);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --font-primary: 'Sora', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-logo {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 800;
}

.sidebar-logo .logo-d { color: var(--text-primary); }
.sidebar-logo .logo-c {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
}

.nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 600;
}

.nav-item.active i { color: var(--accent); }

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 16px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 0.85rem;
    color: #0a0a0f;
    flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 50;
}

.topbar-title {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-topbar {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-topbar:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
}

.content-area {
    padding: 32px;
}

/* ---------- SECTIONS ---------- */
.section { display: none; }
.section.active { display: block; }

/* ---------- STATS GRID ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: rgba(0, 229, 160, 0.2);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.stat-card-icon.green { background: rgba(0, 229, 160, 0.12); color: var(--accent); }
.stat-card-icon.blue { background: rgba(0, 180, 216, 0.12); color: #00B4D8; }
.stat-card-icon.purple { background: rgba(123, 97, 255, 0.12); color: #7B61FF; }
.stat-card-icon.orange { background: rgba(255, 107, 53, 0.12); color: #FF6B35; }

.stat-card-value {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-card-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

/* ---------- TABLE ---------- */
.table-container {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.table-title {
    font-family: var(--font-primary);
    font-size: 1.05rem;
    font-weight: 700;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 24px;
    text-align: left;
    font-size: 0.85rem;
    white-space: nowrap;
}

th {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.moderador {
    background: rgba(0, 229, 160, 0.12);
    color: var(--accent);
}

.role-badge.administrador {
    background: rgba(255, 165, 0, 0.12);
    color: #FFA500;
}

.role-badge.usuario {
    background: rgba(0, 180, 216, 0.12);
    color: #00B4D8;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.8rem;
}

.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: #ff4757; color: #ff4757; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
    padding: 10px 20px;
    background: var(--accent);
    color: #0a0a0f;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary {
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.btn-danger {
    padding: 10px 20px;
    background: rgba(255, 71, 87, 0.12);
    color: #ff6b7a;
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: rgba(255, 71, 87, 0.4);
}

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-base);
}

.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 28px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
}

/* ---------- FORM FIELDS ---------- */
.field-group {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-base);
    outline: none;
}

.field-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-input::placeholder { color: var(--text-tertiary); }

select.field-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

select.field-input option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

textarea.field-input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 6px;
}

/* ---------- IMAGE UPLOAD ---------- */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 2rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.upload-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.upload-preview {
    display: none;
    position: relative;
    margin-top: 16px;
}

.upload-preview.visible { display: block; }

.upload-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.upload-preview .remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.9);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* ---------- PORTFOLIO GRID (Dashboard) ---------- */
.portfolio-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.portfolio-dash-card {
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
}

.portfolio-dash-card:hover {
    border-color: rgba(0, 229, 160, 0.2);
    transform: translateY(-2px);
}

.portfolio-dash-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-dash-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-dash-image .no-image {
    color: var(--text-tertiary);
    font-size: 2rem;
}

.portfolio-dash-body {
    padding: 16px 20px;
}

.portfolio-dash-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--accent-subtle);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.portfolio-dash-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.portfolio-dash-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portfolio-dash-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 20px 16px;
}

/* ---------- TOAST ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toast.success {
    background: rgba(0, 229, 160, 0.15);
    border: 1px solid rgba(0, 229, 160, 0.3);
    color: var(--accent);
}

.toast.error {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff6b7a;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ---------- CONFIRM DIALOG ---------- */
.confirm-dialog {
    text-align: center;
    padding: 12px 0;
}

.confirm-dialog i {
    font-size: 2.5rem;
    color: #ff6b7a;
    margin-bottom: 16px;
}

.confirm-dialog h3 {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- LINK FIELD ---------- */
.link-field { display: none; }
.link-field.visible { display: block; }

/* ---------- CONTACTS / FORMS ---------- */
.contacts-legend {
    display: flex;
    align-items: center;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.pending {
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0, 229, 160, 0.4);
}

.legend-dot.attended {
    background: var(--text-tertiary);
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    border-radius: 4px 0 0 4px;
}

.contact-card.attended {
    opacity: 0.55;
    filter: grayscale(0.3);
}

.contact-card.attended::before {
    background: var(--text-tertiary);
}

.contact-card:not(.attended):hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 229, 160, 0.1);
    transform: translateY(-2px);
}

.contact-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.contact-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.contact-card-date {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.contact-card-service {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--accent-subtle);
    color: var(--accent);
    margin-bottom: 10px;
}

.contact-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.contact-card-info span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-card-info span i {
    color: var(--text-tertiary);
    width: 14px;
    text-align: center;
    font-size: 0.75rem;
}

.contact-card-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    max-height: 80px;
    overflow-y: auto;
}

.contact-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.contact-card-status {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-card-status.pending {
    color: var(--accent);
}

.contact-card-status.attended {
    color: var(--text-tertiary);
}

.btn-attend {
    padding: 6px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #0a0a0f;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-attend:hover {
    background: var(--accent-dark, #00CC8E);
    transform: translateY(-1px);
}

.contact-card-attended-by {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.contacts-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.contacts-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-dash-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .sidebar-overlay.active { display: block; }

    .main-content {
        margin-left: 0;
    }

    .mobile-toggle { display: block; }

    .topbar {
        padding: 0 20px;
    }

    .content-area {
        padding: 20px;
    }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }

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

    .modal {
        max-width: 100%;
        margin: 10px;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .portfolio-dash-grid { grid-template-columns: 1fr; }

    .stat-card { padding: 18px; }
    .stat-card-value { font-size: 1.4rem; }

    .modal-body { padding: 20px; }
    .modal-header { padding: 18px 20px; }
    .modal-footer { padding: 16px 20px; }

    th, td { padding: 10px 14px; font-size: 0.8rem; }
}
