@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&display=swap');

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

body {
    font-family: 'Lato', Arial, sans-serif;
    background: #eeeeee; 
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

header {
    background: #f8981c; 
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-user {
    color: white;
    font-size: 13px;
    font-weight: 700;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.realtime-status {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    color: #003f72;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    max-width: 220px;
    padding: 8px 12px;
    text-align: center;
}

.realtime-status-ready {
    color: #1f6b3a;
}

.realtime-status-syncing {
    color: #003f72;
}

.realtime-status-error {
    color: #8b1e1e;
}

.tab-nav {
    background: #ffffff;
    border-bottom: 1px solid #cbd1cf;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 30px 0;
}

.tab-button {
    appearance: none;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    color: #333;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    min-height: 44px;
    padding: 11px 18px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab-button:hover {
    background: #fff4dc;
}

.tab-button.active {
    background: #003f72;
    border-color: #003f72;
    color: #ffffff;
}

.app-shell {
    background: #ffffff;
}

.tab-panel {
    min-height: 360px;
}

.home-panel {
    align-items: center;
    display: flex;
    justify-content: center;
    padding: 72px 30px;
    text-align: center;
}

.home-panel h2 {
    color: #333;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.2;
}

.event-panel {
    padding: 44px 30px 56px;
}

.event-check-in-card {
    border: 1px solid #cbd1cf;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 520px;
    padding: 28px;
}

.event-check-in-card h2 {
    color: #222;
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.event-check-in-form {
    display: grid;
    gap: 16px;
}

.event-check-in-form .form-group {
    margin-bottom: 0;
}

.event-success {
    background: #d8f3dc;
    border: 1px solid #95d5a6;
    border-radius: 8px;
    color: #1f6b3a;
    font-size: 24px;
    font-weight: 900;
    margin-top: 20px;
    padding: 18px;
    text-align: center;
    word-break: break-word;
}

.event-message {
    color: #66736d;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 14px;
    min-height: 20px;
}

.event-message-error {
    color: #8b1e1e;
}

.event-message-success {
    color: #1f6b3a;
    font-weight: 700;
}

#organizerQrCheckInMessage {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    white-space: pre-line;
}

.qr-scanner {
    background: #f7f9f8;
    border: 1px solid #d9dedc;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    max-width: 100%;
    overflow: hidden;
    padding: 14px;
}

.qr-camera-frame {
    aspect-ratio: 1 / 1;
    background: #14191c;
    border-radius: 8px;
    min-height: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.qr-camera-frame video {
    display: block;
    height: 100%;
    inset: 0;
    object-fit: cover;
    position: absolute;
    width: 100%;
}

.qr-canvas {
    display: none;
}

.qr-reticle {
    border: 2px solid rgba(248, 152, 28, 0.95);
    border-radius: 8px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
    inset: 20%;
    pointer-events: none;
    position: absolute;
}

.qr-camera-empty {
    align-items: center;
    background: #14191c;
    color: #ffffff;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    inset: 0;
    justify-content: center;
    letter-spacing: 0;
    position: absolute;
}

.qr-camera-actions {
    display: flex;
    gap: 10px;
}

.qr-camera-actions .btn {
    flex: 1;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    transform: none;
}

.btn:disabled:hover {
    box-shadow: none;
    transform: none;
}

.btn-primary {
    background: #003f72; 
    color: white;
}

.btn-primary:hover {
    background: #4c91d1; 
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 63, 114, 0.3);
}

.btn-secondary {
    background: #8c9b93; 
    color: white;
}

.btn-secondary:hover {
    background: #9fa4a6; 
}

.btn-danger {
    background: #555555; 
    color: white;
}

.btn-danger:hover {
    background: #333333;
}

/* Auth */
.auth-section {
    background: #ffffff;
    border-bottom: 1px solid #cbd1cf;
    padding: 36px 30px 44px;
}

.auth-card {
    border: 1px solid #cbd1cf;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 480px;
    padding: 28px;
}

.auth-card h2 {
    color: #222;
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.auth-copy {
    color: #66736d;
    font-size: 15px;
    line-height: 1.45;
    margin-bottom: 20px;
}

.auth-provider-button {
    width: 100%;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-divider {
    align-items: center;
    color: #66736d;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 12px;
    margin: 22px 0;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    background: #d9dedc;
    content: "";
    flex: 1;
    height: 1px;
}

.phone-code-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: 1.2fr 1fr;
}

.auth-message {
    color: #66736d;
    font-size: 14px;
    line-height: 1.45;
    margin-top: 18px;
    min-height: 20px;
}

.auth-message-success {
    color: #1f6b3a;
}

.auth-message-error {
    color: #8b1e1e;
}

/* Search Section */
.member-one-on-one-toolbar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #cbd1cf;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 22px 30px 18px;
}

.member-one-on-one-toolbar .realtime-status {
    background: #f4f7f6;
    border: 1px solid #d9dedc;
}

.search-section {
    padding: 30px;
    background: #ffffff;
    border-bottom: 1px solid #cbd1cf;
}

.search-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #cbd1cf;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: #f8981c;
    box-shadow: 0 0 0 3px rgba(248, 152, 29, 0.2);
}

/* Search Results */
.search-results {
    margin-top: 12px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border: 1px solid #cbd1cf;
    border-radius: 8px;
}

.search-result-item {
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #eeeeee;
}

.search-result-item:hover {
    background: #fff4dc;
}

.result-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.result-subtitle {
    font-size: 13px;
    color: #66736d;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #8c9b93;
}

/* Contact Display */
.contact-display {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
    padding-bottom: 60px;
}

.contact-card {
    width: 100%;
    max-width: 820px;
    background: white;
    border: 2px solid #cbd1cf;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: #ffffff;
    color: #222;
    padding: 28px 28px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid #d9dedc;
}

.card-header h2 {
    font-size: 28px;
    line-height: 1.1;
    word-break: break-word;
    flex: 1;
}

.contact-local {
    color: #333;
    font-size: 20px;
    font-weight: 700;
    margin-top: 4px;
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

.card-body {
    padding: 24px 28px 30px;
}

.interview-summary {
    color: #111;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 26px;
}

.contact-section {
    margin-top: 28px;
}

.contact-section:first-child {
    margin-top: 0;
}

.contact-section h3 {
    color: #222;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.qa-list {
    border-top: 1px solid #d9dedc;
}

.qa-item {
    border-bottom: 1px solid #d9dedc;
    padding: 14px 8px;
}

.qa-item h4 {
    color: #111;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 8px;
}

.qa-item p,
.info-grid p,
.activity-list li,
.notes-text {
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.notes-text {
    border-top: 1px solid #d9dedc;
    padding: 12px 8px 0;
}

.info-grid {
    border-top: 1px solid #d9dedc;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.info-grid > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid #d9dedc;
}

.info-grid label {
    color: #111;
    font-size: 14px;
    font-weight: 700;
}

.activity-list {
    border-top: 1px solid #d9dedc;
    list-style-position: inside;
    padding-top: 10px;
}

.voice-recorder {
    background: #f7f9f8;
    border: 1px solid #d9dedc;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.voice-memo-preview {
    display: block;
    width: 100%;
}

.voice-memo-list {
    display: grid;
    gap: 12px;
}

.voice-memo-item {
    background: #f7f9f8;
    border: 1px solid #d9dedc;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.voice-memo-item-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.voice-memo-title {
    color: #222;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.3;
    word-break: break-word;
}

.voice-memo-meta {
    color: #66736d;
    font-size: 13px;
    line-height: 1.45;
}

.voice-memo-item audio {
    display: block;
    width: 100%;
}

.voice-memo-link {
    color: #003f72;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.voice-memo-link:hover {
    text-decoration: underline;
}

.voice-memo-remove-button {
    flex: 0 0 auto;
    padding: 7px 10px;
}

.voice-waveform {
    align-items: center;
    background: #ffffff;
    border: 1px solid #d9dedc;
    border-radius: 8px;
    display: flex;
    gap: 3px;
    height: 72px;
    overflow: hidden;
    padding: 10px;
}

.voice-waveform-bar {
    background: #003f72;
    border-radius: 999px;
    flex: 1;
    min-width: 2px;
}

.voice-recorder-status {
    align-items: center;
    color: #333;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: space-between;
    gap: 12px;
}

#voiceRecorderTimer {
    color: #003f72;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 16px;
}

.voice-recorder-actions {
    display: flex;
    gap: 10px;
}

.voice-recorder-actions .btn {
    flex: 1;
}

.no-selection {
    text-align: center;
    color: #8c9b93;
    font-size: 18px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 40px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #8c9b93;
    transition: color 0.2s ease;
}

.close:hover {
    color: #f8981c;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd1cf;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #003f72;
    box-shadow: 0 0 0 3px rgba(0, 63, 114, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.nested-form-group {
    margin-bottom: 14px;
}

.form-group label[for*="checkbox"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.checkbox-group {
    display: grid;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin: 0;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
}

.form-actions .btn-primary {
    flex: 2;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive Design (Unchanged structure to maintain intended layout) */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .header-actions .btn,
    .realtime-status,
    .auth-user {
        width: 100%;
    }

    .member-one-on-one-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
        padding: 20px 20px 18px;
    }

    .auth-user {
        max-width: none;
        text-align: center;
    }

    .tab-nav {
        flex-direction: column;
        gap: 6px;
        padding: 14px 20px;
    }

    .tab-button {
        border: 1px solid #cbd1cf;
        border-radius: 8px;
        width: 100%;
    }

    .home-panel {
        padding: 54px 20px;
    }

    .event-panel {
        padding: 28px 20px 36px;
    }

    .phone-code-actions {
        grid-template-columns: 1fr;
    }

    .voice-recorder-status,
    .voice-recorder-actions,
    .voice-memo-item-header {
        align-items: stretch;
        flex-direction: column;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-actions {
        width: 100%;
    }

    .card-actions .btn {
        flex: 1;
    }

    .card-header h2 {
        font-size: 24px;
    }

    .contact-local {
        font-size: 18px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 30px;
        margin: 20px;
    }

    .contact-display {
        padding: 20px;
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        border-radius: 0;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 22px;
    }

    .search-section {
        padding: 20px;
    }

    .auth-section {
        padding: 24px 20px 30px;
    }

    .auth-card {
        padding: 22px;
    }

    .event-check-in-card {
        padding: 22px;
    }

    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 20px 16px;
    }

    .info-grid > div {
        grid-template-columns: 92px 1fr;
    }

    .modal-content {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        flex: 1;
    }
}
