/* SilverServers Payments — brand-aligned stylesheet
   Palette: navy #18375f (primary), green #119a49 (action), dark navy #0f2542 (footer),
   light gray #f5f5f5 (bg), text #212427. Font: Open Sans. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #18375f;
    --navy-dark:  #0f2542;
    --green:      #119a49;
    --green-dark: #0c7d3a;
    --gray-bg:    #f5f5f5;
    --gray-line:  #e2e4e7;
    --gray-muted: #6b6b6b;
    --text:       #212427;
    --danger:     #b3261e;
    --warning:    #ffc439;
    --success:    #4caf50;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Open Sans', Verdana, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--gray-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
    background: var(--navy);
    color: #fff;
    padding: 0.9rem 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.site-header .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
}
.site-header .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}
.site-header .brand img {
    height: 36px;
    width: auto;
    display: block;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
}
.site-header .brand .title {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
}
.site-header nav {
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
}
.site-header nav a {
    color: #d8e2ee;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}
.site-header nav a:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }

/* ---------- Main ---------- */
main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

main.narrow { max-width: 560px; }

h1, h2, h3 {
    color: var(--navy);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; margin-top: 1.5rem; }
h3 { font-size: 1.05rem; }

p { margin-bottom: 0.85rem; }

.muted { color: var(--gray-muted); font-size: 0.92rem; }

/* ---------- Card container ---------- */
.card {
    background: #fff;
    border: 1px solid var(--gray-line);
    border-radius: 6px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    margin-bottom: 1.25rem;
}
.card h1:first-child, .card h2:first-child { margin-top: 0; }

/* ---------- Forms ---------- */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.92rem;
}
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--gray-line);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(24,55,95,.25);
    border-color: var(--navy);
}
.form-row { margin-bottom: 1rem; }
.form-row .hint { color: var(--gray-muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* Stripe Elements mount point — styled to match inputs */
#card-element {
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--gray-line);
    border-radius: 4px;
    background: #fff;
}
#card-errors {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    min-height: 1.2em;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease-in-out;
}
.btn:hover:not(:disabled) { background: var(--green-dark); text-decoration: none; }
.btn:disabled { background: #a7a7a7; cursor: not-allowed; }
.btn.secondary { background: var(--navy); }
.btn.secondary:hover:not(:disabled) { background: var(--navy-dark); }
.btn.small { padding: 0.35rem 0.75rem; font-size: 0.88rem; }

/* ---------- Alerts ---------- */
.alert {
    padding: 0.8rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.alert.error   { background: #fdecea; border-color: #f3b6b2; color: #8a1a13; }
.alert.success { background: #ecf7ee; border-color: #b9dfbf; color: #1e5a2b; }
.alert.warning { background: #fff7e0; border-color: #f2d678; color: #6b5200; }
.alert.info    { background: #e9f0f9; border-color: #b8cde3; color: var(--navy-dark); }

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 1rem;
}
th, td {
    text-align: left;
    padding: 0.65rem 0.8rem;
    border-bottom: 1px solid var(--gray-line);
    font-size: 0.93rem;
}
th {
    background: #f0f2f5;
    color: var(--navy);
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
tbody tr:hover { background: #f9fafb; }
td.right, th.right { text-align: right; }
td.num { font-variant-numeric: tabular-nums; }

/* ---------- Status pills ---------- */
.pill {
    display: inline-block;
    padding: 0.12rem 0.6rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pill.pending   { background: #fff3d6; color: #6b5200; }
.pill.charged,
.pill.succeeded { background: #daf1df; color: #1e5a2b; }
.pill.failed    { background: #fdecea; color: #8a1a13; }
.pill.void      { background: #e4e6ea; color: #525459; }
.pill.refunded           { background: #e0e7ef; color: #2b4c75; }
.pill.partially_refunded { background: #fff1e0; color: #7d4b1a; }
.pill.cancelled          { background: #fdecea; color: #8a1a13; }
.pill.on        { background: #daf1df; color: #1e5a2b; }
.pill.off       { background: #f0f2f5; color: var(--gray-muted); }

/* ---------- Surcharge preview ---------- */
.surcharge-preview {
    background: #f7f9fc;
    border: 1px solid var(--gray-line);
    border-radius: 4px;
    padding: 0.9rem 1.1rem;
    margin: 1rem 0;
}
.surcharge-preview dl { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1.2rem; }
.surcharge-preview dt { color: var(--gray-muted); }
.surcharge-preview dd { font-variant-numeric: tabular-nums; text-align: right; }
.surcharge-preview .total { border-top: 1px solid var(--gray-line); padding-top: 0.4rem; margin-top: 0.3rem; font-weight: 700; color: var(--navy); }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-dark);
    color: #a9b7c9;
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    font-size: 0.88rem;
}
.site-footer .inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.site-footer a { color: #d8e2ee; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .site-header .inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    main { margin: 1rem auto; padding: 0 1rem; }
    .card { padding: 1.25rem; }
    table, thead, tbody, tr, th, td { font-size: 0.87rem; }
}
