/* ── FORMS & INPUTS ── */
.form-group {
    margin-bottom: 18px; /* Middle ground */
}
.form-label {
    display: block;
    font-size: 13px; /* Middle ground */
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px; 
}
.form-label .required {
    color: var(--danger);
}
.form-control, .form-select {
    width: 100%;
    padding: 10px 14px; /* Middle ground */
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md); 
    font-family: inherit;
    font-size: 13px; /* Middle ground */
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}
.form-control:hover, .form-select:hover {
    border-color: #CBD5E1;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light); 
}
.form-control::placeholder {
    color: var(--text-light);
}

/* Styled Select */
.form-select, select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%2364748B%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center; 
    background-size: 16px; 
    padding-right: 36px; 
    cursor: pointer;
}

.form-control-icon {
    position: relative;
}
.form-control-icon i {
    position: absolute;
    left: 14px; /* Middle ground */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px; 
}
.form-control-icon input {
    padding-left: 40px; /* Middle ground */
}
.form-control-icon .suffix {
    position: absolute;
    right: 14px; /* Middle ground */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 13px; /* Middle ground */
    font-weight: 500;
}
.form-text {
    font-size: 12px; 
    color: var(--text-muted);
    margin-top: 6px; 
}

/* Switches / Toggles */
.switch {
    position: relative;
    display: inline-block;
    width: 40px; /* Middle ground */
    height: 22px; /* Middle ground */
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 34px; 
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px; /* Middle ground */
    width: 16px; /* Middle ground */
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}
input:checked + .slider {
    background-color: var(--primary);
}
input:checked + .slider:before {
    transform: translateX(18px); /* Middle ground */
}

/* Layouts */
.layout-2-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px; 
    align-items: start;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px; 
    padding: 16px 24px; 
}
.page-btn {
    width: 34px; height: 34px; /* Middle ground */
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 8px; 
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit; font-size: 13px; font-weight: 600; 
    transition: 0.2s;
}
.page-btn:hover {
    background: var(--bg-app);
    color: var(--text-dark);
}
.page-btn.active {
    background: var(--primary);
    color: #FFF;
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}
.btn-lg {
    padding: 10px 20px; /* Middle ground */
    font-size: 14px; /* Middle ground */
}

/* Summary Card */
.summary-card {
    background: var(--bg-app);
    border-radius: var(--radius-lg); 
    padding: 18px; /* Middle ground */
    margin-bottom: 24px; 
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0; /* Middle ground */
    border-bottom: 1px dashed var(--border);
}
.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.summary-label {
    color: var(--text-muted);
    font-size: 13px; /* Middle ground */
    display: flex; align-items: center; gap: 8px;
}
.summary-val {
    font-weight: 700; 
    color: var(--text-dark);
    font-size: 13px; /* Middle ground */
}
.summary-total {
    margin-top: 14px; /* Middle ground */
    padding-top: 14px; /* Middle ground */
    border-top: 2px solid var(--border); 
}
.summary-total .summary-val {
    font-size: 18px; /* Middle ground */
    color: var(--primary);
}

@media (max-width: 640px) {
    .form-control,
    .form-select {
        min-height: 42px;
    }

    .layout-2-col {
        grid-template-columns: 1fr;
    }
}

/* Final form polish for the shared SaaS design pack */
.form-control,
.form-select {
    min-height: 42px;
    border-color: #E2E7F0;
    border-radius: 9px;
    box-shadow: 0 2px 10px rgba(16, 24, 52, 0.025);
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(6, 91, 255, 0.09);
}

