* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f6f8;
    color: #222;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header {
    margin-bottom: 40px;
}

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

.header p {
    margin-top: 6px;
    color: #777;
}

section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

h2 {
    margin-top: 0;
}

.checkin-all {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: #222;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #888;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
}

.button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    background: #222;
    color: white;
    text-decoration: none;
}

.button.secondary {
    background: #eee;
    color: #222;
}

.recipient-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 0;
    border-bottom: 1px solid #eee;
}

.recipient-card h3 {
    margin: 0 0 6px;
}

.recipient-card p {
    margin: 3px 0;
    color: #777;
}

.form-group {
    margin-bottom: 22px;
}

.form-group > label:first-child {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.checkbox-label {
    display: block;
    margin: 10px 0;
    font-weight: normal !important;
}

.checkbox-label input {
    margin-right: 8px;
}

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

.contact-method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.contact-method-header > label {
    margin-bottom: 0 !important;
}

.contact-method-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-methods {
    padding: 25px;
    text-align: center;
    border: 1px dashed #ddd;
    border-radius: 10px;
    color: #888;
}

.contact-method-card {
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fafafa;
}

.contact-method-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.contact-method-title strong {
    font-size: 16px;
}

.contact-method-card label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    color: #555;
}

.contact-method-card input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.remove-method {
    border: none;
    background: transparent;
    color: #d33;
    cursor: pointer;
    font-size: 14px;
}

.modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.4);

    padding: 20px;

    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 450px;

    padding: 25px;

    background: white;

    border-radius: 16px;
}

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

.method-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    width: 100%;

    padding: 16px;
    margin-top: 10px;

    border: 1px solid #ddd;
    border-radius: 10px;

    background: white;

    cursor: pointer;

    text-align: left;
}

.method-option:hover {
    background: #f5f5f5;
}

.method-option strong {
    font-size: 16px;
}

.method-option span {
    margin-top: 4px;
    color: #777;
}

.modal-close {
    width: 100%;
    margin-top: 20px;
    text-align: center;
}

.recipient-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.method-badge {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 6px;

    background: #f0f0f0;

    font-size: 13px;

    color: #555;
}

.no-method {
    color: #d33 !important;
    font-size: 13px;
}

.danger-zone {
    margin-top: 30px;
    padding-top: 25px;

    border-top: 1px solid #eee;
}

.danger-zone h3 {
    margin: 0 0 8px;
    color: #c62828;
}

.danger-zone p {
    margin: 0 0 15px;
    color: #777;
}

.delete-button {
    padding: 10px 16px;

    border: 1px solid #d33;
    border-radius: 8px;

    background: white;
    color: #d33;

    cursor: pointer;
}

.delete-button:hover {
    background: #fff5f5;
}

.message-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding: 20px 0;

    border-bottom: 1px solid #eee;
}

.message-card h3 {
    margin: 0 0 10px;
}

.message-preview {
    margin: 0 0 12px;

    color: #555;

    white-space: pre-wrap;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 10px;

    font-size: 13px;
    color: #777;
}

.message-meta span {
    padding: 4px 8px;

    border-radius: 6px;

    background: #f5f5f5;
}

.recipient-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recipient-select-item {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 8px;

    cursor: pointer;
}

.recipient-select-item:hover {
    background: #fafafa;
}

.recipient-select-item span {
    display: flex;
    flex-direction: column;
}

.recipient-select-item small {
    margin-top: 3px;
    color: #777;
}

.duration-input {
    display: flex;
    gap: 8px;
}

.duration-input input {
    width: 140px;
}

.duration-input select {
    padding: 10px;

    border: 1px solid #ddd;
    border-radius: 8px;

    background: white;
}

.form-group textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #ddd;
    border-radius: 8px;

    font-size: 16px;

    resize: vertical;
}

.checkbox-main {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.form-help {
    margin: 5px 0 10px;

    color: #777;
    font-size: 13px;
}

.home-message-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.home-message-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 20px;

    border: 1px solid #ddd;
    border-radius: 12px;

    background: white;
}

.home-message-card.warning {
    border-color: #e0a000;
    background: #fffaf0;
}

.home-message-info {
    flex: 1;
}

.home-message-info h3 {
    margin: 0 0 10px;
}

.checkin-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;

    margin-top: 15px;
}

.checkin-info div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.checkin-info span {
    font-size: 12px;
    color: #777;
}

.checkin-info strong {
    font-size: 14px;
}

.warning-message {
    margin-top: 15px;

    padding: 10px;

    border-radius: 8px;

    background: #fff0c2;

    font-size: 14px;
    font-weight: bold;
}

.home-message-action {
    flex-shrink: 0;
}

.checkin-button {
    min-width: 120px;

    padding: 13px 18px;

    border: 0;
    border-radius: 8px;

    background: #222;
    color: white;

    font-size: 15px;
    font-weight: bold;

    cursor: pointer;
}

.checkin-button:hover {
    opacity: 0.85;
}

.main-nav {
display: flex;
align-items: center;
gap: 10px;

margin-top: 40px;
padding-top: 20px;

border-top: 1px solid #eee;
}

.main-nav a {
display: inline-block;
padding: 8px 12px;
border-radius: 6px;
text-decoration: none;
color: #555;
}

.main-nav a:hover {
background: #f5f5f5;
}

.logout-form {
margin: 0;
margin-left: auto;
}

.logout-button {
padding: 8px 12px;
border: none;
border-radius: 6px;
background: transparent;
color: #555;
font-family: inherit;
font-size: 14px;
cursor: pointer;
}

.logout-button:hover {
background: #f5f5f5;
}

.checkin-button.disabled {
    background: #ddd;
    color: #888;

    cursor: not-allowed;

    opacity: 1;
}

/* .dashboard-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
} */

/* ============================================================
   Dashboard - Delivery History
   ============================================================ */

.delivery-history {
    margin-top: 32px;
}

.delivery-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #eee;
}

.delivery-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.delivery-recipient,
.delivery-method,
.delivery-time {
    margin: 6px 0;
    font-size: 14px;
    color: #666;
}

.delivery-status {
    margin: 12px 0;
}

.delivery-error {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fff0f0;
    color: #c62828;
    font-size: 13px;
}

.status-badge.pending {
    background: #f0f0f0;
    color: #666;
}

.status-badge.sent {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.opened {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.failed {
    background: #ffebee;
    color: #c62828;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px 0;

    cursor: pointer;

    font-size: 16px;
}

.language-option input {
    width: 18px;
    height: 18px;
}

.phone-input {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.phone-input select {
    flex: 0 0 auto;
    min-width: 150px;
}

.phone-input input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 600px) {

    .phone-input {
        flex-direction: column;
    }

    .phone-input select {
        width: 100%;
    }

}