/* Heliantus Address Book — minimal SPA stylesheet. */

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background: #f5f5f7;
    color: #222;
    font-size: 14px;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.centered-message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: #666;
    font-size: 16px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px solid #ddd;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.app-header h1 {
    margin: 0;
    font-size: 22px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #555;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.toolbar input[type="search"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: filter .12s;
}

.btn-primary {
    background: #2256ff;
    color: #fff;
    border-color: #1c47d6;
}

.btn-secondary {
    background: #fff;
    color: #222;
    border-color: #bbb;
}

.btn-danger {
    background: #fff;
    color: #b00020;
    border-color: #d4a3aa;
}

.btn-primary:hover, .btn-secondary:hover, .btn-danger:hover {
    filter: brightness(0.95);
}

.contact-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e3e3e6;
    border-radius: 6px;
    margin-bottom: 6px;
}

.contact-row .email {
    font-weight: 600;
    word-break: break-all;
}

.contact-row .meta {
    color: #777;
    font-size: 12px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    width: min(440px, 92vw);
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
    margin-top: 0;
}

.form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 4px;
}

.form-group input, .form-group select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[disabled] {
    background: #f0f0f2;
    color: #777;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    z-index: 1100;
}

.toast.hidden {
    display: none;
}

.toast.error {
    background: #b00020;
}

[hidden] {
    display: none !important;
}
