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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #6e6e73;
    margin-top: 0.25rem;
    font-size: 0.95rem;
}

/* Search */
.search-bar {
    margin-bottom: 1.5rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s;
}

.search-bar input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.card {
    display: block;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-client {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.card-person {
    color: #6e6e73;
    font-size: 0.85rem;
}

.empty-state {
    text-align: center;
    color: #6e6e73;
    padding: 3rem 0;
    font-size: 0.95rem;
}

/* === Signature page styles === */
.sig-page .container {
    max-width: 720px;
}

.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: #0071e3;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

.sig-page header {
    text-align: left;
    margin-bottom: 1.5rem;
}

.sig-preview {
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sig-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary {
    background: #0071e3;
    color: #fff;
}

.btn-primary:hover {
    background: #0060c0;
}

.btn-primary.copied {
    background: #30a14e;
}

.instructions {
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 10px;
    padding: 1.5rem;
}

.instructions h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.instructions h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.instructions ol {
    padding-left: 1.25rem;
}

.instructions li {
    font-size: 0.85rem;
    color: #424245;
    margin-bottom: 0.3rem;
}
