body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Oxygen, Cantarell, sans-serif;
    font-size: 14px;
    background: white;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

#mainuicontainer {
    padding: 0;
    margin: 0 auto;
    display: block;
    width: 100%;
}

#appheader {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    padding: 2px 0;
    vertical-align: middle;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 8px #666;
    background: #670487;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .96);
    padding: 18px;
}

.auth-overlay[hidden] {
    display: none;
}

.auth-panel {
    width: min(420px, 100%);
    text-align: center;
    background: white;
    border: 1px solid #d8d0bd;
    border-radius: 8px;
    padding: 34px 28px 28px;
    box-shadow: 0 12px 40px rgba(38, 24, 10, .14);
}

.auth-brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 700;
    color: #91690c;
}

.auth-kicker {
    margin-top: 18px;
    color: #caa975;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    letter-spacing: 8px;
}

.auth-panel h1 {
    margin: 18px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    font-weight: 500;
    color: #0f0a04;
}

.auth-panel p {
    margin: 0 0 22px;
    color: #6a5542;
    font-size: 16px;
}

.auth-contact-box {
    margin: -8px 0 18px;
    padding: 14px;
    border: 1px solid #d8d0bd;
    border-radius: 8px;
    background: #fbfaf7;
}

.auth-contact-box[hidden] {
    display: none;
}

.auth-contact-box p {
    font-size: 14px;
    margin-bottom: 12px;
}

.google-login-btn {
    width: 100%;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid #cfc7bc;
    border-radius: 8px;
    background: white;
    color: #14110d;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
}

.google-mark {
    color: #4285f4;
    font-weight: 800;
}

.auth-user-box {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.auth-user-box[hidden] {
    display: none;
}

#logoutBtn {
    height: 22px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 4px;
    background: rgba(255, 255, 255, .12);
    color: white;
    cursor: pointer;
}

.input-row-container {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: #dfe0e4;
    padding: 5px 10px;
    justify-content: flex-start;
    gap: 10px;
}

.birth-input-wrap {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.date-input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-right: 10px;
    margin-bottom: 0;
    flex-grow: 1;
    min-width: 100px;
    max-width: 200px;
}

.date-input-group label {
    font-weight: bold;
    margin-bottom: 0;
    font-size: .9em;
    flex-shrink: 0;
}

.date-input-group input[type="date"],
.date-input-group input[type="text"],
.date-input-group select {
    width: 100%;
    height: 25px;
    box-sizing: border-box;
    flex-grow: 1;
}

.input-row-container input[type="button"] {
    height: 25px;
    padding: 0 10px;
    border-radius: 13px;
    font-size: .8em;
    align-self: center;
    margin: 0;
    flex-shrink: 0;
}

.numerology-select-group {
    width: auto;
    flex-shrink: 0;
}

#gridcontainer {
    display: flex;
    width: 100%;
    height: 180px;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#gridcontainer > div {
    text-align: center;
    vertical-align: middle;
    border: none;
}

#grdparent {
    width: 170px;
    flex-shrink: 0;
    margin: 0 10px;
}

.grid-nav {
    padding: 0 10px;
}

#gridcontainer > div > input[type="button"] {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 2em;
}

.prediction-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    margin-left: 18px;
}

#gridcontainer .prediction-panel input[type="button"] {
    width: 120px;
    height: 28px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: #670487;
    color: white;
    cursor: pointer;
}

input[type="button"] {
    background: #c1cc11;
    border: none;
}

input {
    outline: none;
}

.container {
    display: table;
    min-width: 170px;
    min-height: 170px;
    border: 3px solid brown;
    border-collapse: collapse;
    font: 12px Arial, sans-serif;
    color: black;
}

.cell-row {
    display: table-row;
    height: 33.33%;
    width: 100%;
}

.cell {
    width: 33.33%;
    border: 1px solid black;
    display: table-cell;
    text-align: center;
    vertical-align: middle;
    background: #fff;
}

.dasha {
    color: #02adff;
    font-weight: bold;
}

.adasha {
    color: red;
    font-weight: bold;
}

.pdasha {
    color: darkgreen;
    font-weight: bold;
}

#basiccontainer {
    background: #efefef;
    display: table;
    width: 100%;
    color: #670487;
}

#basiccontainer > span {
    display: table-cell;
    width: 50%;
    padding: 5px;
    font-weight: bold;
}

.center-text {
    text-align: center;
}

.dasha-select-row {
    display: table;
    text-align: center;
    padding: 3px 0;
    background: #efefef;
    width: 100%;
}

.dasha-label-cell {
    width: 30px;
    display: table-cell;
    padding-left: 5px;
}

.dasha-select-cell {
    display: table-cell;
    width: 100%;
}

.dasha-action-cell {
    display: table-cell;
    width: 140px;
    padding-right: 12px;
    vertical-align: middle;
}

.predict-inline-btn {
    background: #670487 !important;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    height: 28px;
    min-width: 110px;
    padding: 0 10px;
}

#dashaPredictBtn {
    background: #670487;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    height: 30px;
    min-width: 116px;
}

#natalPredictBtn:disabled,
#dashaPredictBtn:disabled,
.predict-inline-btn:disabled {
    background: #b7b7b7 !important;
    color: #666 !important;
    cursor: not-allowed;
    opacity: .78;
}

#dashaselect {
    width: 98%;
    outline: none;
    height: 40px;
    background: transparent;
    border-radius: 10px;
    border-color: #c1cc11;
}

.list-container {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 313px;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background: white;
}

.antra-header {
    display: table;
    position: relative;
    margin: 0;
    width: 100%;
    background: #c1cc11;
    border: none;
    padding: 0;
    border-collapse: collapse;
}

.antra-header span {
    width: 100%;
    display: table-cell;
    height: 30px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid black;
}

#tabdetails {
    flex-grow: 1;
    padding: 0;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

#adashalist {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border-collapse: collapse;
    background: #efefef;
    color: #000;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 40%;
}

.adasha-row {
    display: table;
    width: 100%;
    cursor: pointer;
    border-collapse: separate;
    border-spacing: 0;
}

.adasha-row > span {
    display: table-cell;
    width: 50px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #670487;
}

.adasha-row > p {
    display: table-cell;
    text-align: left;
    padding: 10px;
    margin: 0;
    line-height: 1.5em;
    border: 1px solid #670487;
}

.adasha-row > .row-action-cell {
    display: table-cell;
    width: 130px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid #670487;
}

#pdlist {
    flex-grow: 1;
    overflow: hidden;
    padding: 5px 0 0;
    border-top: 1px solid #670487;
}

.pd-header {
    display: block;
    text-align: center;
    padding: 3px 0;
    background: #efefef;
}

.pd-header span {
    width: 100%;
    display: table-cell;
    height: 30px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid black;
    background: #670487;
    color: white;
}

#pdperiods {
    overflow-y: auto;
    max-height: 100%;
}

.pd-list-item {
    display: flex;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
}

.pd-list-item > span {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #670487;
    border-left: 1px solid #670487;
    flex-shrink: 0;
}

.pd-list-item > p {
    text-align: left;
    padding: 5px 10px;
    margin: 0;
    line-height: 1.5em;
    border-right: 1px solid #670487;
    flex-grow: 1;
}

.pd-list-item > .row-action-cell {
    width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #670487;
    flex-shrink: 0;
}

.selected-row {
    background: #cbc3ce;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, .4);
    padding-top: 0;
}

.modal-content {
    position: fixed;
    left: 50%;
    top: 60px;
    transform: translateX(-50%);
    background-color: #fefefe;
    margin: 0;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    max-height: calc(100vh - 80px);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
    display: flex;
    flex-direction: column;
}

.modal-content.prediction-modal {
    max-width: 760px;
}

.modal-header {
    padding: 5px 15px;
    background-color: #670487;
    color: white;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    touch-action: none;
    user-select: none;
    flex-shrink: 0;
}

.modal-content.is-dragging {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .42);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: #ccc;
    text-decoration: none;
    cursor: pointer;
}

#modalBody {
    padding: 10px 0;
    overflow: auto;
    min-height: 0;
}

.modal-input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.modal-input-group label {
    font-weight: bold;
    margin-bottom: 5px;
}

.modal-input-group input[type="text"],
.modal-input-group input[type="date"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.modal-footer {
    text-align: right;
    padding-top: 10px;
}

.modal-calculate-btn {
    background: #670487 !important;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em !important;
    height: auto !important;
}

.subscription-box {
    text-align: left;
    line-height: 1.45;
}

.subscription-box p {
    margin: 0 0 12px;
}

.subscription-box a {
    color: #670487;
    font-weight: 700;
}

.whatsapp-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366 !important;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.whatsapp-mark {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

.whatsapp-mark svg {
    width: 20px;
    height: 20px;
    fill: #25d366;
}

.whatsapp-compose {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    background: #f7f7f7;
}

.whatsapp-compose[hidden] {
    display: none;
}

.whatsapp-compose label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.whatsapp-compose textarea {
    width: 100%;
    min-height: 86px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    resize: vertical;
    font: inherit;
}

.prediction-result {
    text-align: left;
    line-height: 1.45;
}

.prediction-result h4 {
    margin: 14px 0 6px;
    color: #670487;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.prediction-result ul {
    margin: 0 0 8px 18px;
    padding: 0;
}

.prediction-result li {
    margin-bottom: 6px;
}

.prediction-note {
    display: block;
    clear: both;
    border: 1px dashed #aaa;
    padding: 8px;
    background: #fafafa;
    line-height: 1.45;
    margin: 8px 0 10px;
    box-sizing: border-box;
}

.mini-grid {
    width: 150px;
    height: 150px;
    border-collapse: collapse;
    margin: 8px 0 14px;
}

.mini-grid td {
    width: 33.33%;
    border: 1px solid #222;
    text-align: center;
    vertical-align: middle;
    height: 50px;
}

.pyramid-box {
    text-align: center;
    padding: 10px;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.pyramid-row {
    margin: 6px 0;
}

.pyramid-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 3px;
    border-radius: 50%;
    background: #670487;
    color: white;
    font-weight: 700;
}

#numerologyType {
    width: auto !important;
    min-width: 160px;
}

.input-row-container .date-input-group:has(#numerologyType) {
    width: max-content;
    max-width: none;
    flex-grow: 0;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    body {
        overflow-x: hidden;
    }

    #mainuicontainer {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    #basiccontainer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        table-layout: auto;
        flex: 0 0 auto;
        position: relative;
        z-index: 2;
    }

    #basiccontainer > span {
        display: block;
        width: auto;
        min-width: 0;
        padding: 4px 3px;
        font-size: 12px;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .date-input-group {
        width: auto !important;
        max-width: none !important;
        margin: 5px 5px 5px 0;
        flex-direction: row;
        flex-shrink: 0;
        flex-basis: auto;
    }

    #calcbtn {
        width: auto;
        margin: 5px 0 10px;
        padding: 8px;
    }

    #numerologyType {
        width: auto !important;
        min-width: unset;
    }

    #gridcontainer {
        height: auto;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .prediction-panel {
        width: 100%;
        max-width: 220px;
        margin: 8px 12px 0;
    }

    #gridcontainer .prediction-panel input[type="button"] {
        width: 100%;
    }

    .dasha-select-row {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) 82px;
        align-items: center;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        flex: 0 0 auto;
        position: relative;
        z-index: 2;
    }

    .dasha-label-cell {
        display: block;
        width: auto;
        padding: 3px 4px;
        font-size: 12px;
        box-sizing: border-box;
    }

    .dasha-select-cell {
        display: block;
        min-width: 0;
        padding: 3px 4px;
        box-sizing: border-box;
    }

    .dasha-action-cell {
        display: block;
        width: auto;
        padding: 3px 3px;
        box-sizing: border-box;
    }

    #dashaselect {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    #dashaPredictBtn,
    .predict-inline-btn {
        min-width: 0;
        width: 76px;
        height: 26px;
        padding: 0 3px;
        font-size: 9.5px;
        white-space: nowrap;
        box-sizing: border-box;
    }

    #adashalist,
    #pdperiods {
        overflow-x: hidden;
    }

    .list-container {
        position: static;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        flex: 1 1 auto;
        min-height: 430px;
        margin: 0 5px 5px;
    }

    .adasha-row {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 82px;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .adasha-row > span {
        display: flex;
        width: auto;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }

    .adasha-row > p {
        display: block;
        min-width: 0;
        padding: 6px 5px;
        line-height: 1.3em;
        font-size: 12px;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .adasha-row > .row-action-cell {
        display: flex;
        width: auto;
        min-width: 0;
        padding: 3px;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    .pd-list-item {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr) 82px;
        align-items: stretch;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .pd-list-item > span {
        width: auto;
        font-size: 12px;
    }

    .pd-list-item > p {
        min-width: 0;
        padding: 5px;
        line-height: 1.3em;
        font-size: 12px;
        overflow-wrap: anywhere;
        box-sizing: border-box;
    }

    .pd-list-item > .row-action-cell {
        width: auto;
        min-width: 0;
        padding: 3px;
        box-sizing: border-box;
    }
}
