* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 8px 16px 40px;
    background: #f4f4f4;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #363636;
}

.card {
    max-width: 1345px;
    margin: 0 auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(10, 10, 10, .1);
    padding: 20px 20px 22px;
}

h1 { font-size: 30px; margin: 0 0 24px; color: #363636; }
h2 { font-size: 22px; margin: 0 0 16px; }

/* Section dividers */
.divider {
    display: flex;
    align-items: center;
    margin: 18px 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #6b6b6b;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; }
.divider span { padding: 0 10px; }
.divider.blue::before, .divider.blue::after { background: #3e8ed0; }
.divider.gray::before, .divider.gray::after { background: #7a7a7a; }

/* Fields */
label {
    display: block;
    font-weight: 700;
    margin: 12px 0 8px;
}
label.sub-label { margin-top: 0; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], textarea, select {
    width: 100%;
    height: 40px;
    padding: 7px 11px;
    font-size: 16px;
    font-family: inherit;
    color: #363636;
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(10, 10, 10, .05);
    outline: none;
}
textarea { height: auto; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #485fc7; box-shadow: 0 0 0 .125em rgba(72, 95, 199, .25); }
::placeholder { color: #b5b5b5; }

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    box-shadow: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23485fc7' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.select-sm { width: auto; min-width: 180px; max-width: 100%; }
.select-md { width: 280px; max-width: 100%; }

.phone-wrap { position: relative; }
.phone-wrap .prefix {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: #7a7a7a; font-size: 15px; pointer-events: none;
}
.phone-wrap input { padding-left: 40px; }

.radios { display: flex; gap: 14px; margin-bottom: 30px; }
.radio { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; margin: 0; cursor: pointer; }

.sub-section { padding: 10px 48px 30px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 9px 16px;
    font-size: 16px;
    font-family: inherit;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    line-height: 1.3;
}
.btn-blue { background: #3e8ed0; }
.btn-blue:hover { background: #3488ce; }
.btn-green { background: #00d1b2; margin-top: 12px; }
.btn-green:hover { background: #00c4a7; }
.btn-red { background: #f14668; }
.btn-red:hover { background: #ef3a5d; }
.btn-gray { background: #7a7a7a; }
.btn-sm { padding: 5px 10px; font-size: 14px; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: 4px; margin-bottom: 18px; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }
.alert-success { background: #effaf5; color: #257953; }
.alert-error { background: #feecf0; color: #cc0f35; }

/* Admin */
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.topbar h1 { margin: 0; }
.topbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.search { display: flex; gap: 8px; margin-bottom: 16px; }
.search input { max-width: 360px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #ededed; white-space: nowrap; }
th { background: #fafafa; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: #6b6b6b; }
tr:hover td { background: #fafbff; }
.muted { color: #7a7a7a; }
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span { padding: 5px 11px; border: 1px solid #dbdbdb; border-radius: 4px; text-decoration: none; color: #363636; }
.pager .current { background: #485fc7; border-color: #485fc7; color: #fff; }

.detail { display: grid; grid-template-columns: 220px 1fr; gap: 0; margin-bottom: 8px; }
.detail dt, .detail dd { margin: 0; padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.detail dt { font-weight: 700; color: #4a4a4a; }
.detail dd { white-space: pre-wrap; word-break: break-word; }

.login { max-width: 400px; margin: 60px auto; }

@media (max-width: 600px) {
    h1 { font-size: 24px; }
    .sub-section { padding: 10px 0 20px; }
    .detail { grid-template-columns: 1fr; }
    .detail dt { border-bottom: 0; padding-bottom: 0; }
    .select-md, .select-sm { width: 100%; }
}
