/* 04-components.css — Cards, tables, forms, badges, buttons,
   datagrid, dropdowns, toasts, alerts
   =========================================================== */

/* -----------------------------------------------------------
   9. Cards
   ----------------------------------------------------------- */
.card {
    margin-bottom: 1.25rem;
}


/* Use subtle border variant (dimmer than --tblr-card-border-color) */
.card-header {
    border-bottom: 1px solid var(--c-border-subtle);
}

.card-title {
    font-size: 0.65625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--c-text);
    margin: 0;
}

.card-footer {
    border-top: 1px solid var(--c-border-subtle);
}

.card-full {
    padding-left: 0;
    padding-right: 0;
}

/* -----------------------------------------------------------
   10. Tables
   ----------------------------------------------------------- */
.table {
    font-size: 0.8125rem;
}

.table th {
    font-size: 0.59375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-text-subtle);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}

.table td {
    font-size: 0.8125rem;
    padding: 0.46875rem 0.75rem;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border-subtle);
    vertical-align: middle;
}

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

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.022);
    --bs-table-accent-bg: rgba(255, 255, 255, 0.022);
}

[data-bs-theme="light"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.025);
    --bs-table-accent-bg: rgba(0, 0, 0, 0.025);
}

.table-hover > tbody > tr:hover > * {
    background-color: var(--c-overlay);
    --bs-table-accent-bg: var(--c-overlay);
}

/* -----------------------------------------------------------
   11. Forms
   ----------------------------------------------------------- */
.form-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-text-subtle);
    margin-bottom: 0.375rem;
}

.form-control,
.form-select {
    background-color: var(--c-elevated);
    border-color: var(--c-border);
    color: var(--c-text);
    border-radius: var(--radius-sm);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--c-elevated);
    border-color: var(--c-accent-bdr);
    box-shadow: 0 0 0 3px var(--c-accent-dim);
    color: var(--c-text);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--c-text-subtle);
}

/* -----------------------------------------------------------
   12. Badges & Status — uses Tabler defaults, no overrides
   ----------------------------------------------------------- */

/* -----------------------------------------------------------
   13. Buttons — Beautiful system

/* -----------------------------------------------------------
   14. Datagrid
   ----------------------------------------------------------- */
.datagrid-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-text-subtle);
    margin-bottom: 0.25rem;
}

.datagrid-content {
    font-size: 0.8125rem;
    color: var(--c-text);
}

/* -----------------------------------------------------------
   15. Dropdowns (outside sidebar)
   — colors/shadow/radius handled by --tblr-dropdown-* bridge vars
   ----------------------------------------------------------- */
.dropdown-item {
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
}


/* -----------------------------------------------------------
   17. Toast Notifications
   ----------------------------------------------------------- */
.toast {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}


/* -----------------------------------------------------------
   18. Sidebar Badges — inline indicators on nav links
   ----------------------------------------------------------- */
.fp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.15em 0.45em;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

.fp-badge-success { background: rgba(39, 201, 122, 0.18); color: #27c97a; }
.fp-badge-danger  { background: rgba(214, 57, 57, 0.18);  color: #d63939; }
.fp-badge-warning { background: rgba(247, 183, 49, 0.18); color: #f7b731; }
.fp-badge-info    { background: rgba(61, 143, 248, 0.18);  color: #3d8ff8; }

@keyframes fp-badge-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.3; }
}

.fp-badge-animate {
    animation: fp-badge-blink 1.8s ease-in-out infinite;
}

/* Hide badges when sidebar is collapsed */
html.sidebar-collapsed .fp-badge {
    display: none;
}

