:root {
    --addr-border: rgba(15, 23, 42, 0.08);
    --addr-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

.addresses-page {
    min-height: calc(100vh - 200px);
    padding: 1.25rem 0 5.5rem;
    background: radial-gradient(1200px 400px at 90% -10%, rgba(0, 188, 212, 0.12), transparent 60%),
        radial-gradient(900px 380px at 10% 0%, rgba(13, 59, 102, 0.10), transparent 55%),
        #f5f7fa;
}

.addresses-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.5rem 0 1rem;
}

.addresses-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dark-color);
    font-size: 1.85rem;
    font-weight: 900;
}

.addresses-title i {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(0, 188, 212, 0.12);
    color: var(--navy-color);
}

.addresses-subtitle {
    margin-top: 0.3rem;
    color: rgba(15, 23, 42, 0.65);
    font-weight: 500;
}

.btn-add {
    background: linear-gradient(180deg, rgba(0, 188, 212, 0.22), rgba(0, 188, 212, 0.10));
    border: 1px solid rgba(0, 188, 212, 0.30);
    color: var(--navy-color);
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-add:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-add:active {
    transform: translateY(1px);
}

.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.address-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 1rem;
}

.address-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.address-label {
    font-weight: 900;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.address-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(0, 188, 212, 0.25);
    background: rgba(0, 188, 212, 0.10);
    color: var(--navy-color);
    font-weight: 900;
    font-size: 0.85rem;
}

.address-text {
    margin-top: 0.65rem;
    color: rgba(15, 23, 42, 0.72);
    font-weight: 600;
    line-height: 1.6;
}

.address-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
    flex-wrap: wrap;
}

.address-actions button {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(15, 23, 42, 0.05);
    color: var(--dark-color);
    padding: 0.6rem 0.8rem;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.address-actions .danger {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
}

.addresses-empty {
    background: #fff;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: 18px;
    padding: 2rem 1rem;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(0, 188, 212, 0.12);
    color: var(--navy-color);
    font-size: 1.5rem;
}

.addresses-empty h3 {
    font-weight: 900;
    color: var(--dark-color);
    margin-bottom: 0.35rem;
}

.addresses-empty p {
    color: rgba(15, 23, 42, 0.65);
    font-weight: 600;
    margin-bottom: 0.9rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 3000;
}

.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100% - 32px));
    background: #fff;
    border-radius: 18px;
    border: 1px solid var(--addr-border);
    box-shadow: var(--addr-shadow);
    z-index: 3100;
    overflow: hidden;
}

.modal-header {
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--addr-border);
    background: linear-gradient(135deg, rgba(0, 188, 212, 0.12), rgba(13, 59, 102, 0.06));
}

.modal-close {
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
}

.modal-body {
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
}

.field label {
    display: block;
    margin-bottom: 0.22rem;
    font-weight: 800;
    color: var(--dark-color);
    font-size: 1rem;
}

.req {
    color: #ef4444;
    font-weight: 800;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.68rem 0.9rem;
    font-size: 1rem;
    background: #fff;
    outline: none;
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field-error {
    display: block;
    min-height: 14px;
    margin-top: 0.15rem;
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.82rem;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.78);
}

.modal-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .addresses-header {
        flex-direction: column;
        align-items: stretch;
    }
}
