:root {
    --brand: #337ab7;
    --brand-hover: #23527c;
    --text: #333;
    --muted: #777;
    --border: #e7e7e7;
    --soft: #f8f8f8;
    --container: 1170px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    background: #fff;
    color: var(--text);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
}
a { color: var(--brand); text-decoration: none; }
a:hover, a:focus { color: var(--brand-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; vertical-align: middle; }
button, input, textarea { font: inherit; }
code, pre { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 15px; }
.clearfix::after { content: ""; display: table; clear: both; }

/* Header: intentionally close to the current classic Notify24 layout. */
.site-header {
    min-height: 52px;
    margin-bottom: 0;
    border: 1px solid transparent;
    border-width: 0 0 1px;
    border-color: #e7e7e7;
    background: #f8f8f8;
}
.header-inner { min-height: 50px; display: flex; align-items: center; }
.brand {
    display: block;
    flex: 0 0 auto;
    margin-right: 26px;
    color: #777;
    font-size: 20px;
    font-weight: 400;
    line-height: 20px;
    padding: 15px 0;
}
.brand:hover, .brand:focus { color: #5e5e5e; text-decoration: none; }
.brand-mark { display: none; }
.brand-name, .brand-name span { color: inherit; font-size: inherit; font-weight: inherit; }
.main-nav { display: flex; align-items: stretch; }
.main-nav a {
    display: block;
    color: #777;
    line-height: 20px;
    padding: 15px 15px;
}
.main-nav a:hover, .main-nav a:focus { color: #333; background: transparent; text-decoration: none; }
.main-nav a.is-active { color: #555; background: #e7e7e7; }
.header-actions { display: none; }
.nav-toggle {
    display: none;
    margin-left: auto;
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: transparent;
}
.nav-toggle span:not(.sr-only) { display: block; width: 22px; height: 2px; margin: 4px 0; border-radius: 1px; background: #888; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Home hero */
.hero { padding: 46px 0 30px; overflow: hidden; background: #fff; }
.hero-grid { display: flex; align-items: center; gap: 40px; min-height: 465px; }
.hero-copy { flex: 1 1 50%; padding-bottom: 25px; }
.hero h1 {
    margin: 20px 0 10px;
    color: #333;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 400;
}
.hero-lead { margin: 0 0 24px; color: #555; font-size: 21px; font-weight: 300; line-height: 1.4; }
.hero-login { max-width: 470px; margin-top: 26px; }
.login-row { display: flex; gap: 8px; align-items: flex-start; }
.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    color: #555;
    font-size: 14px;
    line-height: 1.42857143;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
textarea.form-control { height: auto; min-height: 120px; resize: vertical; }
.form-control:focus { border-color: #66afe9; outline: 0; box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6); }
.btn {
    display: inline-block;
    margin-bottom: 0;
    padding: 6px 12px;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.btn:hover, .btn:focus { color: #333; text-decoration: none; background: #e6e6e6; border-color: #adadad; }
.btn-primary { color: #fff; background: var(--brand); border-color: #2e6da4; }
.btn-primary:hover, .btn-primary:focus { color: #fff; background: #286090; border-color: #204d74; }
.login-row .form-control { min-width: 0; flex: 1 1 0; }
.hero-login-links { margin-top: 9px; font-size: 13px; }
.hero-login-links a + a::before { content: " · "; color: #aaa; margin: 0 5px 0 2px; }
.hero-visual { flex: 1 1 50%; text-align: center; }
.hero-phone { width: min(100%, 500px); margin: 0 auto; }

/* Sections */
.section { padding: 48px 0; }
.section + .section { border-top: 1px solid #f0f0f0; }
.section-heading { margin: 0 0 38px; text-align: center; }
.section-heading h2 { margin: 20px 0 10px; font-size: 30px; font-weight: 300; line-height: 1.1; }
.section-heading p { max-width: 720px; margin: 0 auto; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.feature-item { text-align: center; }
.feature-item img { display: block; width: 100%; max-width: 300px; aspect-ratio: 3 / 2; object-fit: cover; margin: 0 auto 18px; }
.feature-item h4 { margin: 10px 0 10px; font-size: 18px; font-weight: 500; line-height: 1.1; }
.feature-item p { margin: 0 0 10px; color: #555; }
.content-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.content-block h2 { margin: 20px 0 20px; font-size: 30px; font-weight: 300; }
.current-list { margin: 0; padding-left: 21px; }
.current-list li { margin-bottom: 10px; }
.faq-item { margin-bottom: 22px; }
.faq-item h4 { margin: 0 0 8px; font-size: 18px; font-weight: 500; }
.faq-item p { margin: 0; color: #555; }

/* Generic inner pages */
.page-wrap { padding: 32px 0 55px; }
.page-wrap h1 { margin: 20px 0 28px; font-size: 36px; font-weight: 400; line-height: 1.1; }
.page-wrap h3 { margin: 28px 0 12px; font-size: 24px; font-weight: 400; }
.page-wrap h4 { margin: 24px 0 10px; font-size: 18px; font-weight: 500; }
.page-wrap p { margin: 0 0 10px; }
.page-wrap ul { margin-top: 0; margin-bottom: 10px; }
.lead { margin-bottom: 20px !important; font-size: 21px; font-weight: 300; line-height: 1.4; }
.inner-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 30px; }
.inner-feature { text-align: center; }
.inner-feature img { width: 100%; max-width: 300px; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 12px; }
.inner-feature h4 { margin-top: 10px; }
.example-list article { margin-bottom: 31px; }
.example-list article h4 { margin-bottom: 10px; }

/* Docs and tables: keep the same simple, uncarded feel. */
.api-links { margin: 0 0 22px; padding-left: 20px; }
.api-links li { margin-bottom: 6px; }
.table-responsive { min-height: .01%; overflow-x: auto; margin: 18px 0; }
table { width: 100%; max-width: 100%; border-spacing: 0; border-collapse: collapse; }
th, td { padding: 8px; line-height: 1.42857143; vertical-align: top; border-top: 1px solid #ddd; text-align: left; }
thead th { vertical-align: bottom; border-bottom: 2px solid #ddd; }
code { padding: 2px 4px; color: #c7254e; background: #f9f2f4; border-radius: 4px; font-size: 90%; }
pre {
    display: block;
    margin: 0 0 10px;
    padding: 9.5px;
    overflow: auto;
    color: #333;
    font-size: 13px;
    line-height: 1.42857143;
    word-break: break-all;
    word-wrap: break-word;
    background: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}
pre code { padding: 0; color: inherit; background: transparent; border-radius: 0; font-size: inherit; }
.alert { margin: 20px 0; padding: 15px; border: 1px solid transparent; border-radius: 4px; }
.alert-info { color: #31708f; background: #d9edf7; border-color: #bce8f1; }

/* Forms / future account screens */
.form-box { width: min(100%, 520px); }
.form-group { margin-bottom: 15px; }
.form-group label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }
.checkbox { margin: 10px 0; }
.future-note { color: #777; font-size: 13px; }

/* Footer */
.site-footer { margin-top: 20px; padding: 24px 0; border-top: 1px solid #eee; color: #777; background: #fff; }
.footer-simple { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links-inline { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links-inline a { color: #777; }
.footer-links-inline a:hover { color: #333; }

/* Compatibility with first draft classes, so unfinished/future pages still render cleanly. */
.page-hero, .page-hero.compact { padding: 30px 0 0; background: #fff; }
.page-hero h1 { margin: 20px 0 10px; font-size: 36px; font-weight: 400; }
.page-hero p { color: #777; }
.eyebrow { display: none; }
.button { display: inline-block; padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #333; font-weight: 400; }
.button:hover { text-decoration: none; background: #e6e6e6; }
.button-primary { color: #fff; background: var(--brand); border-color: #2e6da4; }
.button-primary:hover { color: #fff; background: #286090; }
.button-full { width: 100%; }
.auth-shell, .cabinet-shell, .contact-shell { padding: 35px 15px 55px; }
.auth-card, .contact-card, .cabinet-card { width: min(100%, 560px); padding: 0; border: 0; box-shadow: none; }
.auth-card h1, .contact-card h1, .cabinet-card h1 { font-weight: 400; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; font-weight: 700; }
.input-group input, .input-group textarea { display: block; width: 100%; padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px; }

@media (max-width: 991px) {
    .container { max-width: 970px; }
    .hero { padding-top: 28px; }
    .hero-grid { min-height: 0; gap: 20px; }
    .hero h1 { font-size: 36px; }
    .hero-lead { font-size: 19px; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inner-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .container { max-width: none; }
    .site-header { min-height: 51px; }
    .header-inner { display: flex; flex-wrap: wrap; }
    .brand { padding-left: 0; }
    .nav-toggle { display: block; }
    .main-nav { display: none; flex: 0 0 calc(100% + 30px); width: calc(100% + 30px); margin: 0 -15px; border-top: 1px solid #e7e7e7; }
    .main-nav.is-open { display: block; }
    .main-nav a { padding: 10px 15px; }
    .main-nav a.is-active { background: #e7e7e7; }
    .hero-grid { display: block; }
    .hero-copy { padding-bottom: 5px; }
    .hero h1 { margin-top: 10px; font-size: 34px; }
    .hero-lead { font-size: 18px; }
    .login-row { display: block; }
    .login-row .form-control { margin-bottom: 8px; }
    .hero-visual { margin-top: 25px; }
    .hero-phone { width: min(100%, 450px); }
    .section { padding: 38px 0; }
    .feature-grid, .inner-feature-grid, .content-columns { grid-template-columns: 1fr; }
    .feature-grid { gap: 36px; }
    .content-columns { gap: 15px; }
    .inner-feature-grid { gap: 34px; }
    .footer-simple { display: block; }
    .footer-links-inline { margin-top: 10px; }
}

/* PHP 8 application additions */
.flash-stack { padding-top: 18px; }
.alert-success { color:#3c763d; background:#dff0d8; border-color:#d6e9c6; }
.alert-danger { color:#a94442; background:#f2dede; border-color:#ebccd1; }
.btn-danger { color:#fff; background:#d9534f; border-color:#d43f3a; }
.btn-danger:hover,.btn-danger:focus { color:#fff; background:#c9302c; border-color:#ac2925; }
.nav-logout { display:flex; align-items:stretch; }
.nav-logout button { border:0; background:transparent; color:#777; padding:15px; font:inherit; cursor:pointer; }
.nav-logout button:hover { color:#333; }
.cabinet-section { margin:35px 0 50px; }
.cabinet-section h3 { border-bottom:1px solid #eee; padding-bottom:10px; }
.actions-cell form { display:inline-block; margin:2px; }
.status-ok { color:#3c763d; font-weight:600; }
.status-bad { color:#a94442; font-weight:600; }
.inline-form { display:flex; gap:8px; align-items:center; flex-wrap:wrap; max-width:950px; }
.inline-form .form-control { width:220px; }
.inline-form .form-control.wide { width:440px; max-width:100%; }
.recipient-edit { display:flex; gap:6px; align-items:center; min-width:390px; }
.recipient-edit .form-control { height:32px; }
.recipient-edit .form-control.small { width:90px; }
.group-list { max-width:700px; margin:0 0 15px; }
.group-row { display:flex; justify-content:space-between; align-items:center; gap:15px; border-bottom:1px solid #eee; padding:8px 0; }
.api-key-value { word-break:break-all; }
@media (max-width:767px) {
    .nav-logout { display:block; }
    .nav-logout button { width:100%; text-align:left; padding:10px 15px; }
    .inline-form,.recipient-edit { display:block; min-width:0; }
    .inline-form .form-control,.inline-form .form-control.wide,.recipient-edit .form-control,.recipient-edit .form-control.small { width:100%; margin-bottom:7px; }
}
.checkbox-inline { display:inline-flex; align-items:center; gap:4px; margin:3px 8px 3px 0; font-weight:400; }
.checkbox-inline input { margin:0; }
.recipient-groups { display:flex; flex-wrap:wrap; align-items:center; min-width:280px; }
.future-note { color:#777; font-size:13px; margin-top:7px; }
@media (max-width:767px) {
    .recipient-groups { min-width:0; margin-bottom:7px; }
}
