/* Tenant Applications Manager - Public Styles */

/* Reset & Base */
.tam-page {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1e293b;
    background: #f1f5f9;
    min-height: 100vh;
}

.tam-page * {
    box-sizing: border-box;
}

/* Container */
.tam-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tam-container-wide {
    max-width: 1200px;
}

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

.tam-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.tam-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 1rem;
}

/* Form Header (wide layout) */
.tam-apply-form .tam-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.tam-header-left h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.tam-user-email {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.tam-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tam-save-status {
    font-size: 0.875rem;
    color: #64748b;
}

.tam-save-status.saving {
    color: #f59e0b;
}

.tam-save-status.saved {
    color: #10b981;
}

.tam-completion {
    font-size: 0.875rem;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
}

/* Cards */
.tam-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.tam-card-header {
    padding: 1.5rem 1.5rem 0;
}

.tam-card-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.tam-card-header p {
    margin: 0;
    color: #64748b;
}

.tam-card-body {
    padding: 1.5rem;
}

/* Forms */
.tam-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tam-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tam-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.tam-field input[type="text"],
.tam-field input[type="email"],
.tam-field input[type="tel"],
.tam-field input[type="number"],
.tam-field input[type="date"],
.tam-field select,
.tam-field textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tam-field input:focus,
.tam-field select:focus,
.tam-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tam-field input::placeholder {
    color: #9ca3af;
}

.tam-field .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Checkbox */
.tam-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.tam-checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.tam-checkbox-label span {
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* File Upload Card */
.tam-file-upload-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.tam-file-upload-card:hover {
    border-color: #3b82f6;
    background: #f1f5f9;
}

.tam-file-upload-card.has-file {
    background: #f0fdf4;
    border: 2px solid #10b981;
    border-style: solid;
}

.tam-file-upload-card input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.tam-file-upload-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
}

.tam-file-upload-card.has-file .tam-file-upload-icon {
    background: #10b981;
}

.tam-file-upload-arrow {
    font-size: 1.25rem;
    font-weight: bold;
    color: #64748b;
}

.tam-file-check {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
}

.tam-file-upload-content {
    flex-grow: 1;
    min-width: 0;
}

.tam-file-prompt {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.tam-file-types {
    font-size: 0.75rem;
    color: #64748b;
}

.tam-file-name {
    font-weight: 600;
    color: #166534;
    margin-bottom: 0.125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tam-file-status {
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 500;
}

/* Legacy file uploaded message (from JS updates) */
.tam-file-uploaded {
    font-size: 0.875rem;
    color: #10b981;
    margin-top: 0.25rem;
}

/* Other Documents Section */
.tam-other-docs-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #e2e8f0;
}

.tam-other-docs-toggle {
    width: 100%;
}

.tam-other-docs-toggle.hidden {
    display: none;
}

.tam-other-docs-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.tam-other-docs-container.hidden {
    display: none;
}

.tam-other-docs-header {
    margin-bottom: 1rem;
}

.tam-other-docs-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.tam-other-docs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}

@media (max-width: 768px) {
    .tam-other-docs-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Acknowledgements Section */
.tam-ack-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.tam-ack-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tam-ack-number {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.tam-ack-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.tam-ack-content {
    padding: 1.25rem;
}

.tam-ack-description {
    margin: 0 0 1rem;
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.tam-ack-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 0.5rem;
}

.tam-ack-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.tam-ack-checkbox span {
    font-size: 0.9375rem;
    color: #166534;
    font-weight: 500;
}

/* Credit Permission */
.tam-credit-permission {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tam-permission-option {
    flex: 1;
    cursor: pointer;
}

.tam-permission-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tam-permission-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.15s;
}

.tam-permission-label:hover {
    border-color: #cbd5e1;
}

.tam-permission-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: bold;
}

.tam-permission-icon.allow {
    background: #dcfce7;
    color: #16a34a;
}

.tam-permission-icon.decline {
    background: #fee2e2;
    color: #dc2626;
}

.tam-permission-option:has(input:checked) .tam-permission-label {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tam-permission-option:has(input[value="allow"]:checked) .tam-permission-label {
    border-color: #10b981;
    background: #f0fdf4;
}

.tam-permission-option:has(input[value="decline"]:checked) .tam-permission-label {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Credit Decline Notice */
.tam-credit-decline-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    color: #92400e;
    font-size: 0.875rem;
    line-height: 1.5;
}

.tam-credit-decline-notice.hidden {
    display: none;
}

.tam-notice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Signature Section */
.tam-signature-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.tam-signature-field {
    flex: 2;
}

.tam-signature-field label,
.tam-date-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.tam-date-field {
    flex: 1;
}

.tam-date-display {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tam-date-display.has-date {
    background: #f0fdf4;
    border-color: #10b981;
    color: #166534;
}

.tam-date-placeholder {
    font-weight: 400;
    font-size: 0.875rem;
    color: #94a3b8;
    font-style: italic;
}

@media (max-width: 768px) {
    .tam-credit-permission {
        flex-direction: column;
    }

    .tam-signature-row {
        flex-direction: column;
    }

    .tam-signature-field,
    .tam-date-field {
        width: 100%;
    }
}

/* Signature Pad */
.tam-signature-pad {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.5rem;
}

.tam-signature-pad canvas {
    width: 100%;
    height: 150px;
    border: 1px dashed #e2e8f0;
    border-radius: 0.25rem;
    cursor: crosshair;
}

.tam-signature-clear {
    margin-top: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    background: #f1f5f9;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}

/* Buttons */
.tam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, transform 0.1s;
}

.tam-btn:active {
    transform: scale(0.98);
}

.tam-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.tam-btn-primary:hover {
    background: #2563eb;
}

.tam-btn-primary:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.tam-btn.tam-btn-disabled {
    background: #9ca3af !important;
    color: #fff !important;
    cursor: not-allowed !important;
    flex-direction: column;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-decoration: none;
}

.tam-btn.tam-btn-disabled:hover {
    background: #9ca3af !important;
}

.tam-btn.tam-btn-disabled span {
    font-size: 0.75rem;
    opacity: 0.9;
    display: block;
    margin-top: 0.25rem;
}

.tam-btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.tam-btn-secondary:hover {
    background: #cbd5e1;
}

.tam-btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.tam-btn-danger:hover {
    background: #fecaca;
    color: #b91c1c;
}

.tam-btn-link {
    background: none;
    color: #3b82f6;
    padding: 0.5rem;
}

.tam-btn-link:hover {
    text-decoration: underline;
}

.tam-btn-block {
    width: 100%;
}

.tam-field-secondary {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Messages */
.tam-error {
    padding: 0.75rem 1rem;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.tam-success {
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.tam-info {
    padding: 0.75rem 1rem;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.tam-alert {
    padding: 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.tam-alert h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
}

.tam-alert p {
    margin: 0.5rem 0 0;
}

.tam-alert-success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.tam-alert-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.tam-alert-ready {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #22c55e;
    color: #166534;
    padding: 1.5rem;
}

.tam-alert-ready-to-submit {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    color: #92400e;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.tam-alert-ready-to-submit .tam-ready-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f59e0b;
    border-radius: 50%;
}

.tam-alert-ready-to-submit .tam-ready-icon .dashicons {
    font-size: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
    color: #fff;
}

.tam-alert-ready-to-submit .tam-ready-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #92400e;
}

.tam-alert-ready-to-submit .tam-ready-content p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #a16207;
}

.tam-ready-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #22c55e;
    border-radius: 50%;
}

.tam-ready-icon .dashicons {
    font-size: 1.75rem;
    width: 1.75rem;
    height: 1.75rem;
    color: #fff;
}

.tam-ready-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #166534;
}

.tam-ready-content p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #15803d;
}

.tam-completion-badge.complete {
    background: #dcfce7;
    color: #166534;
}

/* PDF Download */
.tam-pdf-download {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid #86efac;
}

.tam-btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #dc2626;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s;
}

.tam-btn-pdf:hover {
    background: #b91c1c;
    color: #fff;
}

.tam-btn-pdf .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
}

.tam-pdf-note {
    margin: 0.75rem 0 0;
    font-size: 0.875rem;
    color: #15803d;
}

.tam-incomplete-list {
    margin: 0.75rem 0 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.tam-incomplete-list li {
    margin: 0.25rem 0;
}

.tam-incomplete-list a {
    color: #92400e;
    font-weight: 500;
    text-decoration: underline;
}

.tam-incomplete-list a:hover {
    color: #78350f;
}

/* Layout */
.tam-layout {
    display: flex;
    gap: 2rem;
}

/* Sidebar */
.tam-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.tam-section-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tam-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s;
}

.tam-nav-item:last-child a {
    border-bottom: none;
}

.tam-nav-item a:hover {
    background: #f8fafc;
}

.tam-nav-item.active a {
    background: #eff6ff;
    color: #1d4ed8;
}

.tam-nav-item.complete a {
    color: #16a34a;
}

.tam-nav-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e2e8f0;
    border-radius: 50%;
    flex-shrink: 0;
}

.tam-nav-item.active .tam-nav-number {
    background: #3b82f6;
    color: #fff;
}

.tam-nav-item.complete .tam-nav-number {
    background: #10b981;
    color: #fff;
}

.tam-nav-title {
    flex-grow: 1;
    font-size: 0.875rem;
}

.tam-nav-check {
    color: #10b981;
    font-weight: bold;
}

.tam-nav-actions {
    margin-top: 1rem;
}

/* Main Content */
.tam-main {
    flex-grow: 1;
    min-width: 0;
}

/* Sections */
.tam-section {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.tam-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.tam-section-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.tam-section-desc {
    margin: 0.5rem 0 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* History Timeline */
.tam-history-timeline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    flex-wrap: wrap;
}

.tam-timeline-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.tam-timeline-year {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
}

.tam-timeline-year.covered {
    background: #dcfce7;
    border-color: #10b981;
    color: #166534;
}

.tam-year-check {
    color: #10b981;
    font-weight: bold;
}

/* Month/Year Fields */
.tam-monthyear-fields {
    display: flex;
    gap: 0.5rem;
}

.tam-monthyear-fields select {
    flex: 1;
}

.tam-monthyear-month {
    flex: 1.5 !important;
}

.tam-monthyear-year {
    flex: 1 !important;
}

/* Yes/No Question */
.tam-yes-no-question {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.tam-question-label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.tam-yes-no-options {
    display: flex;
    gap: 1.5rem;
}

.tam-radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: all 0.15s;
}

.tam-radio-option:hover {
    border-color: #3b82f6;
}

.tam-radio-option input[type="radio"] {
    margin: 0;
}

.tam-radio-option input[type="radio"]:checked + span {
    color: #3b82f6;
    font-weight: 600;
}

.tam-radio-option:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tam-repeater-hidden {
    display: none;
}

/* License plate uppercase */
input[name*="vehicle_plate"] {
    text-transform: uppercase;
}

/* Pet Type Select */
.tam-pet-type-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tam-pet-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 80px;
}

.tam-pet-type-option:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.tam-pet-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tam-pet-type-option:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tam-pet-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.tam-pet-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.tam-pet-type-option:has(input:checked) .tam-pet-label {
    color: #1d4ed8;
    font-weight: 600;
}

/* Custom Pets Layout - Two Column */
.tam-pets-layout {
    display: flex;
    gap: 1.5rem;
}

.tam-pets-left {
    flex-shrink: 0;
}

.tam-pets-right {
    flex-grow: 1;
}

.tam-field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.tam-pet-type-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tam-pet-type-column .tam-pet-type-option {
    flex-direction: row;
    min-width: 120px;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
}

.tam-pet-type-column .tam-pet-icon {
    font-size: 1.5rem;
}

.tam-pets-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ESA Toggle */
.tam-esa-toggle {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.tam-toggle-options {
    display: flex;
    gap: 1rem;
}

.tam-toggle-option {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: all 0.15s;
}

.tam-toggle-option:hover {
    border-color: #3b82f6;
}

.tam-toggle-option input[type="radio"] {
    margin: 0;
}

.tam-toggle-option:has(input:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.tam-toggle-option:has(input:checked) span {
    color: #1d4ed8;
    font-weight: 600;
}

/* Responsive for Pets Layout */
@media (max-width: 768px) {
    .tam-pets-layout {
        flex-direction: column;
    }

    .tam-pet-type-column {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tam-pets-fields-grid {
        grid-template-columns: 1fr;
    }
}

.tam-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.tam-section-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Repeater */
.tam-repeater-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.tam-repeater-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
}

.tam-repeater-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tam-repeater-item-title {
    font-weight: 600;
    color: #374151;
}

.tam-repeater-remove {
    width: 2rem;
    height: 2rem;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.tam-repeater-remove:hover {
    background: #fecaca;
}

.tam-repeater-item-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.tam-repeater-add {
    width: 100%;
}

/* Review Page */
.tam-apply-review .tam-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tam-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.tam-status-submitted {
    background: #dcfce7;
    color: #166534;
}

/* Checklist */
.tam-checklist-card .tam-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tam-completion-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.tam-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tam-checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.tam-checklist-item:last-child {
    border-bottom: none;
}

.tam-checklist-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.tam-checklist-item.complete .tam-checklist-icon {
    background: #dcfce7;
    color: #16a34a;
}

.tam-checklist-item.incomplete .tam-checklist-icon {
    background: #fee2e2;
    color: #dc2626;
}

.tam-checklist-title {
    flex-grow: 1;
}

.tam-checklist-link {
    font-size: 0.875rem;
    color: #3b82f6;
    text-decoration: none;
}

.tam-checklist-link:hover {
    text-decoration: underline;
}

/* Review Summary - Two Column Grid */
.tam-review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .tam-review-grid {
        grid-template-columns: 1fr;
    }
}

.tam-review-section-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.tam-review-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tam-review-section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
}

.tam-review-section-body {
    padding: 1rem 1.25rem;
}

.tam-edit-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #3b82f6;
    text-decoration: none;
}

.tam-edit-link:hover {
    text-decoration: underline;
}

.tam-review-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
}

.tam-review-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.tam-review-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.tam-review-field dt {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    flex-shrink: 0;
}

.tam-review-field dd {
    margin: 0;
    font-size: 0.875rem;
    color: #1e293b;
    text-align: right;
    word-break: break-word;
}

.tam-review-item {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.tam-review-item:last-child {
    margin-bottom: 0;
}

.tam-review-item h4 {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tam-empty {
    color: #9ca3af;
    font-style: italic;
}

.tam-declared-none {
    color: #166534;
    font-weight: 500;
    background: #f0fdf4;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.tam-signature-preview {
    max-width: 150px;
    max-height: 60px;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    background: #fff;
}

/* Submit Section */
.tam-submit-card {
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.tam-submit-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

/* Footer */
.tam-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .tam-layout {
        flex-direction: column;
    }

    .tam-sidebar {
        width: 100%;
        order: 2;
    }

    .tam-main {
        order: 1;
    }

    .tam-section-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        background: transparent;
        box-shadow: none;
    }

    .tam-nav-item {
        flex: 1 1 auto;
    }

    .tam-nav-item a {
        padding: 0.75rem;
        border-radius: 0.5rem;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        border: none;
        justify-content: center;
    }

    .tam-nav-title {
        display: none;
    }

    .tam-apply-form .tam-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .tam-header-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tam-fields-grid {
        grid-template-columns: 1fr;
    }

    .tam-repeater-item-fields {
        grid-template-columns: 1fr;
    }

    .tam-section-nav-buttons {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .tam-section-nav-buttons .tam-btn {
        width: 100%;
    }

    .tam-submit-actions {
        flex-direction: column;
    }

    .tam-submit-actions .tam-btn {
        width: 100%;
    }
}

/* Collapsible Details Section */
.tam-details-collapse {
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    overflow: hidden;
}

.tam-details-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
    transition: background 0.15s ease;
    list-style: none;
}

.tam-details-summary::-webkit-details-marker {
    display: none;
}

.tam-details-summary:hover {
    background: #f1f5f9;
}

.tam-details-collapse[open] .tam-details-summary {
    border-bottom-color: #e2e8f0;
}

.tam-details-icon {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid #64748b;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    transition: transform 0.2s ease;
}

.tam-details-collapse[open] .tam-details-icon {
    transform: rotate(90deg);
}

.tam-details-content {
    padding: 1.5rem;
}

.tam-details-content .tam-review-grid {
    margin: 0;
}

/* Name fields row on start page */
.tam-fields-row {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.tam-fields-row .tam-field {
    flex: 1;
    margin-bottom: 1rem;
}

.tam-fields-row .tam-field:nth-child(2) {
    flex: 0.8;
}

@media (max-width: 600px) {
    .tam-fields-row {
        flex-direction: column;
        gap: 0;
    }
    
    .tam-fields-row .tam-field {
        flex: none;
    }
}

.tam-field .required {
    color: #dc2626;
}

/* Name Display (Read-Only) in Personal Information Section */
.tam-name-display {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.tam-name-display-header {
    margin-bottom: 0.75rem;
}

.tam-name-display-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tam-name-display-fields {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tam-name-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tam-name-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.tam-name-value {
    font-size: 1rem;
    color: #1e293b;
    font-weight: 600;
}

@media (max-width: 600px) {
    .tam-name-display-fields {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ===================================
   DASHBOARD STYLES
   =================================== */

.tam-dashboard-page .tam-container {
    max-width: 800px;
}

.tam-dashboard {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tam-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.tam-dashboard-welcome h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.tam-user-email {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.tam-dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Empty State */
.tam-empty-state {
    padding: 3rem 2rem;
    text-align: center;
}

.tam-empty-icon {
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.tam-empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #475569;
}

.tam-empty-state p {
    margin: 0;
    color: #64748b;
}

/* Applications List */
.tam-applications-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Application Card */
.tam-application-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.tam-application-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tam-app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tam-app-id {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

.tam-app-card-body {
    padding: 1rem;
}

.tam-app-property {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.tam-app-property.tam-no-property {
    color: #94a3b8;
}

.tam-app-dates {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.tam-date-label {
    color: #94a3b8;
}

.tam-date-value {
    color: #475569;
    font-weight: 500;
}

/* Progress Bar */
.tam-app-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tam-progress-bar {
    flex-grow: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.tam-progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tam-progress-text {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
}

/* Card Footer */
.tam-app-card-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fafafa;
    border-top: 1px solid #e2e8f0;
}

/* Status Badges in Dashboard */
.tam-status-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: capitalize;
}

.tam-status-draft {
    background: #f1f5f9;
    color: #64748b;
}

.tam-status-in_progress {
    background: #fef3c7;
    color: #92400e;
}

.tam-status-submitted {
    background: #dbeafe;
    color: #1e40af;
}

.tam-status-under_review {
    background: #e0e7ff;
    color: #3730a3;
}

.tam-status-approved {
    background: #dcfce7;
    color: #166534;
}

.tam-status-denied {
    background: #fee2e2;
    color: #991b1b;
}

/* Button Variants */
.tam-btn-outline {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.tam-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Responsive */
@media (max-width: 600px) {
    .tam-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tam-dashboard-actions {
        width: 100%;
    }

    .tam-dashboard-actions .tam-btn {
        flex: 1;
        text-align: center;
    }

    .tam-app-dates {
        flex-direction: column;
        gap: 0.25rem;
    }

    .tam-app-card-footer {
        flex-direction: column;
    }

    .tam-app-card-footer .tam-btn {
        width: 100%;
        text-align: center;
    }
}

/* Back to Dashboard Link */
.tam-back-to-dashboard {
    display: inline-block;
    font-size: 0.8125rem;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.15s;
}

.tam-back-to-dashboard:hover {
    color: #3b82f6;
}

/* ===================================
   TEST MODE STYLES
   =================================== */

.tam-test-mode-banner {
    background: repeating-linear-gradient(45deg, #000, #000 10px, #fbbf24 10px, #fbbf24 20px);
    padding: 10px 20px;
    font-size: 14px;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.tam-test-mode-banner .tam-test-mode-text {
    display: inline-block;
    background: #fbbf24;
    color: #1f2937;
    padding: 8px 20px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tam-test-mode-banner .tam-test-mode-text strong {
    font-weight: 700;
    margin-right: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tam-page.tam-has-test-banner {
    padding-top: 50px;
}

.tam-test-otp-display {
    background: repeating-linear-gradient(45deg, #fef3c7, #fef3c7 10px, #fde68a 10px, #fde68a 20px);
    border: 2px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9375rem;
}

.tam-test-otp-display strong {
    color: #92400e;
}

.tam-test-otp-code {
    display: inline-block;
    background: #000;
    color: #fbbf24;
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.25rem;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}
