/* =========================================
   COMPONENTS: Buttons, Cards, Inputs, Tables
   ========================================= */

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--duration-fast) var(--ease-out);
    cursor: pointer;
    border: 1px solid transparent;
    gap: 8px;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #6c92be);
    color: #fff;
    box-shadow: 0 6px 16px rgba(76, 122, 168, 0.25);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(76, 122, 168, 0.32);
    filter: brightness(1.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-heading);
}

.btn-ghost.active {
    background: var(--bg-highlight);
    color: var(--text-heading);
    font-weight: 600;
    border-color: var(--border);
}

/* --- Cards --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration-normal) var(--ease-out),
        box-shadow var(--duration-normal) var(--ease-out),
        border-color var(--duration-normal);
}

.card:hover {
    border-color: var(--glass-border-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* --- Inputs --- */
.input,
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--duration-fast);
}

.input:focus,
.form-control:focus {
    outline: none;
    border-color: rgba(76, 122, 168, 0.6);
    background: var(--bg-layer-1);
    box-shadow: 0 0 0 3px rgba(76, 122, 168, 0.12);
}

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

/* --- Tables --- */
.table-wrap {
    overflow-x: auto;
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.table th {
    text-align: left;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table tr {
    transition: background-color var(--duration-fast);
}

.table tr:hover td {
    background-color: var(--bg-tertiary);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-success {
    background: rgba(47, 143, 113, 0.12);
    color: var(--success);
}

.badge-danger {
    background: rgba(201, 92, 92, 0.12);
    color: var(--danger);
}

.badge-warning {
    background: rgba(213, 157, 74, 0.15);
    color: var(--warning);
}

.badge-info {
    background: rgba(76, 122, 168, 0.12);
    color: var(--info);
}

/* --- Labels --- */
.label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 700;
    margin-bottom: 8px;
}

.text-label {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 700;
}

/* --- Form Group --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group:last-child {
    margin-bottom: 0;
}
