/* === COMPONENTS: Buttons, Forms, Cards, Badges, Tables === */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

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

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

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

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

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color var(--transition);
}

.btn-icon:hover {
    color: var(--text);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.form-input,
.select-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

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

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

textarea.form-input {
    resize: vertical;
    min-height: 60px;
}

.select-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 d='M6 8L1 3h10z' fill='%23707070'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    transition: border-color var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-title {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Badges */
.badge {
    padding: 0.2rem 0.65rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.badge-pending {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.badge-progress {
    background: var(--blue-bg);
    color: var(--blue);
}

.badge-done {
    background: var(--green-bg);
    color: var(--green);
}

/* Progress bar */
.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    position: relative;
    flex: 1;
    min-width: 80px;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
    transition: width 0.4s ease;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -18px;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

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

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.55rem 1.2rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Simple list */
.simple-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.simple-list-item:last-child {
    border-bottom: none;
}
