﻿
/* =========================================================
   ISKCON AHMEDABAD DEVOTEE PORTAL
   Devotee management pages
   ========================================================= */

:root {
    --dev-primary: #7E4555;
    --dev-primary-dark: #603342;
    --dev-primary-light: #f7eff2;
    --dev-accent: #c58a45;
    --dev-text: #29313a;
    --dev-muted: #77808c;
    --dev-border: #e5e7eb;
    --dev-surface: #ffffff;
    --dev-background: #f7f8fa;
    --dev-radius: 12px;
    --dev-shadow: 0 3px 14px rgba(31, 41, 55, 0.055);
}

/* Page background and typography */

.devotee-page {
    color: var(--dev-text);
    padding-top: 32px;
    padding-bottom: 38px;
}

    .devotee-page,
    .devotee-page input,
    .devotee-page select,
    .devotee-page textarea,
    .devotee-page button {
        font-family: inherit;
    }

        .devotee-page h2 {
            color: var(--dev-text);
            font-size: 29px;
            font-weight: 700;
            letter-spacing: -0.6px;
            margin-bottom: 6px;
        }

        .devotee-page h5 {
            font-size: 16px;
            font-weight: 650;
            margin: 0;
        }

.devotee-subtitle {
    color: var(--dev-muted);
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Page heading */

.devotee-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 25px;
}

    .devotee-page-header .btn {
        flex-shrink: 0;
    }

/* Main cards */

.devotee-page .card {
    background: var(--dev-surface);
    border: 1px solid var(--dev-border);
    border-radius: var(--dev-radius);
    box-shadow: var(--dev-shadow);
    overflow: hidden;
}

    .devotee-page .card + .card {
        margin-top: 20px;
    }

.devotee-page .card-header {
    background: linear-gradient( 110deg, #fbf6f7 0%, #ffffff 100% );
    border-bottom: 1px solid var(--dev-border);
    padding: 15px 20px;
    color: var(--dev-primary-dark);
}

.devotee-page .card-body {
    padding: 22px;
}

/* List page toolbar */

.devotee-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.devotee-toolbar-search {
    flex: 1 1 260px;
    max-width: 390px;
}

.devotee-toolbar-filter {
    flex: 0 1 220px;
}

.devotee-total {
    margin-left: auto;
    color: var(--dev-muted);
    font-size: 14px;
    white-space: nowrap;
}

    .devotee-total strong {
        color: var(--dev-primary);
        font-size: 17px;
    }

/* Form controls */

.devotee-page .form-control {
    min-height: 42px;
    border: 1px solid #dce1e7;
    border-radius: 7px;
    background-color: #fff;
    color: var(--dev-text);
    font-size: 14px;
    padding: 9px 12px;
    box-shadow: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.devotee-page textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.devotee-page .form-control:hover {
    border-color: #c4cbd4;
}

.devotee-page .form-control:focus {
    border-color: var(--dev-primary);
    box-shadow: 0 0 0 3px rgba(126, 69, 85, 0.12);
    outline: none;
}

.devotee-page label {
    color: #424a55;
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.devotee-page .form-check {
    padding-top: 6px;
    padding-bottom: 6px;
}

.devotee-page .form-check-input {
    accent-color: var(--dev-primary);
}

.devotee-page .form-check-label {
    margin-left: 4px;
    cursor: pointer;
}

.devotee-page .text-danger {
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.devotee-page .field-validation-error {
    color: #c0392b;
}

.devotee-page .input-validation-error {
    border-color: #dc3545;
}

/* Buttons */

.devotee-page .btn {
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 15px;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

    .devotee-page .btn:hover {
        transform: translateY(-1px);
    }

.devotee-page .btn-primary {
    background-color: var(--dev-primary);
    border-color: var(--dev-primary);
    color: #fff;
}

    .devotee-page .btn-primary:hover,
    .devotee-page .btn-primary:focus {
        background-color: var(--dev-primary-dark);
        border-color: var(--dev-primary-dark);
        color: #fff;
    }

.devotee-page .btn-outline-secondary {
    background: #fff;
    border-color: #d8dde4;
    color: #535d69;
}

    .devotee-page .btn-outline-secondary:hover {
        background: #f3f4f6;
        color: #303944;
    }

.devotee-page .btn-info {
    background-color: #edf4f8;
    border-color: #dbe8ef;
    color: #285d78;
}

    .devotee-page .btn-info:hover {
        background-color: #dcecf4;
        border-color: #c6dfe9;
        color: #204e65;
    }

.devotee-page .btn-warning {
    background-color: #fff3d9;
    border-color: #f5e4b9;
    color: #825b16;
}

    .devotee-page .btn-warning:hover {
        background-color: #fbe8bb;
        border-color: #efd79d;
        color: #67460f;
    }

.devotee-page .btn-success {
    background-color: #e5f5ed;
    border-color: #cdebdc;
    color: #23734b;
}

    .devotee-page .btn-success:hover {
        background-color: #d3eedf;
        border-color: #b7e2cb;
        color: #195d3b;
    }

/* Devotees table */

.devotee-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--dev-border);
    border-radius: 8px;
}

.devotee-page .table {
    width: 100%;
    margin-bottom: 0;
    color: var(--dev-text);
    font-size: 13px;
    vertical-align: middle;
    border-color: var(--dev-border);
}

    .devotee-page .table thead th {
        background: #f8f7f8;
        color: #4a3a40;
        border-bottom: 1px solid #e2dce0;
        font-size: 12px;
        font-weight: 700;
        padding: 13px 11px;
        white-space: nowrap;
    }

    .devotee-page .table tbody td {
        padding: 11px;
        border-color: #edf0f3;
    }

    .devotee-page .table tbody tr {
        transition: background-color 0.15s ease;
    }

        .devotee-page .table tbody tr:hover {
            background-color: #fbf7f9;
        }

        .devotee-page .table tbody tr:last-child td {
            border-bottom: 0;
        }

    .devotee-page .table .btn {
        margin: 2px 2px 2px 0;
        padding: 6px 9px;
        font-size: 12px;
        white-space: nowrap;
    }

/* Status badges: Bootstrap 4 and Bootstrap 5 compatible */

.devotee-page .badge {
    display: inline-block;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 10px;
    letter-spacing: 0.1px;
}

    .devotee-page .badge-success,
    .devotee-page .badge.bg-success {
        background-color: #e4f5eb !important;
        color: #23734b !important;
    }

    .devotee-page .badge-secondary,
    .devotee-page .badge.bg-secondary {
        background-color: #edf0f3 !important;
        color: #5e6874 !important;
    }

    .devotee-page .badge-warning,
    .devotee-page .badge.bg-warning {
        background-color: #fff2d6 !important;
        color: #825b16 !important;
    }

/* Profile details */

.devotee-profile-value {
    min-height: 48px;
    margin-bottom: 12px;
}

.devotee-profile-label {
    color: var(--dev-muted);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.devotee-profile-text {
    color: var(--dev-text);
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

    .devotee-profile-text a {
        color: var(--dev-primary);
    }

/* Alerts */

.devotee-page .alert {
    border-radius: 8px;
    padding: 13px 16px;
    font-size: 14px;
}

.devotee-page .alert-success {
    background: #eaf7ef;
    border-color: #ccebd7;
    color: #236842;
}

.devotee-page .alert-danger {
    background: #fff0ef;
    border-color: #f5d0cd;
    color: #a32f2a;
}

/* Empty table state */

.devotee-empty-state {
    padding: 35px 15px !important;
    color: var(--dev-muted);
    text-align: center;
}

/* Tablet and mobile */

@media (max-width: 767.98px) {
    .devotee-page {
        padding-top: 22px;
        padding-bottom: 25px;
    }

        .devotee-page h2 {
            font-size: 24px;
        }

    .devotee-page-header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

        .devotee-page-header .btn {
            width: 100%;
        }

    .devotee-page .card-body {
        padding: 15px;
    }

    .devotee-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .devotee-toolbar-search,
    .devotee-toolbar-filter {
        width: 100%;
        max-width: none;
        flex-basis: auto;
    }

    .devotee-total {
        margin-left: 0;
    }

    .devotee-page .table {
        min-width: 1000px;
    }

        .devotee-page .table thead th,
        .devotee-page .table tbody td {
            padding: 10px 9px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .devotee-page *,
    .devotee-page *::before,
    .devotee-page *::after {
        transition: none !important;
        animation: none !important;
    }
}


/* =========================================================
   PROFESSIONAL PORTAL HEADER
   ========================================================= */

.portal-navbar {
    position: relative;
    z-index: 1000;
    min-height: 76px;
    padding: 10px 0;
    background: linear-gradient( 110deg, #603342 0%, #7E4555 55%, #70404f 100% );
    border-bottom: 3px solid #c58a45;
    box-shadow: 0 4px 16px rgba(44, 25, 33, 0.16);
}

    .portal-navbar .container {
        gap: 20px;
    }

    .portal-navbar .portal-brand {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        margin: 0;
        padding: 4px 0;
        color: #fff;
        white-space: normal;
        text-decoration: none;
    }

.portal-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 23px;
    font-weight: 700;
    font-family: Georgia, serif;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.04);
}

    .portal-brand-icon span {
        line-height: 1;
    }

.portal-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.portal-brand-title {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.1px;
}

.portal-brand-subtitle {
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.portal-navbar .portal-nav {
    align-items: center;
    gap: 5px;
}

    .portal-navbar .portal-nav .nav-link {
        position: relative;
        padding: 11px 15px;
        border-radius: 7px;
        color: rgba(255, 255, 255, 0.82);
        font-size: 14px;
        font-weight: 500;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

        .portal-navbar .portal-nav .nav-link:hover,
        .portal-navbar .portal-nav .nav-link:focus {
            background: rgba(255, 255, 255, 0.10);
            color: #fff;
        }

        .portal-navbar .portal-nav .nav-link.active {
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
            font-weight: 700;
        }

            .portal-navbar .portal-nav .nav-link.active::after {
                position: absolute;
                right: 15px;
                bottom: 3px;
                left: 15px;
                height: 2px;
                border-radius: 2px;
                background: #e7bd82;
                content: "";
            }

.portal-navbar .navbar-toggler {
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 8px;
    box-shadow: none;
}

    .portal-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    }

/* Tablet and mobile navigation */

@media (max-width: 991.98px) {
    .portal-navbar {
        min-height: 68px;
    }

        .portal-navbar .navbar-collapse {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid rgba(255, 255, 255, 0.17);
        }

        .portal-navbar .portal-nav {
            align-items: stretch;
            gap: 3px;
        }

            .portal-navbar .portal-nav .nav-link {
                padding: 12px 14px;
            }

                .portal-navbar .portal-nav .nav-link.active::after {
                    right: auto;
                    bottom: 8px;
                    left: 0;
                    width: 3px;
                    height: 22px;
                }
}

@media (max-width: 575.98px) {
    .portal-brand-icon {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        font-size: 21px;
    }

    .portal-brand-title {
        font-size: 14px;
    }

    .portal-brand-subtitle {
        font-size: 10px;
        letter-spacing: 0.8px;
    }
}


.portal-footer {
    margin-top: 32px;
    padding: 20px 0 8px;
    border-top: 1px solid #e5e7eb;
    color: #77808c;
    font-size: 13px;
}

    .portal-footer p {
        margin: 0;
    }


/* Login page */

.login-page {
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    border: 1px solid #e7dfe2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(74, 42, 54, 0.10);
}

.login-brand {
    padding: 30px 24px 26px;
    text-align: center;
    color: #fff;
    background: linear-gradient(120deg, #603342, #7E4555);
    border-bottom: 3px solid #c58a45;
}

.login-brand-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: bold;
}

.login-brand h1 {
    margin: 0 0 5px;
    font-size: 21px;
    font-weight: 700;
}

.login-brand p {
    margin: 0;
    color: rgba(255,255,255,.8);
    font-size: 12px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.login-card-body {
    padding: 30px;
}

    .login-card-body h2 {
        margin: 0 0 7px;
        color: #29313a;
        font-size: 25px;
        font-weight: 700;
        text-align:center;
    }

.login-subtitle {
    margin-bottom: 25px;
    color: #77808c;
    font-size: 14px;
    line-height: 1.6;
    text-align:center;
}

.login-card label {
    display: block;
    margin-bottom: 8px;
    color: #424a55;
    font-size: 13px;
    font-weight: 600;
}

.login-card .form-control {
    min-height: 46px;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 14px;
}

    .login-card .form-control:focus {
        border-color: #7E4555;
        box-shadow: 0 0 0 3px rgba(126,69,85,.12);
    }

.login-submit {
    width: 100%;
    min-height: 46px;
    border-radius: 8px;
    background: #7E4555;
    border-color: #7E4555;
    font-weight: 600;
}

    .login-submit:hover,
    .login-submit:focus {
        background: #603342;
        border-color: #603342;
    }

.login-validation {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #f0cccc;
    border-radius: 8px;
    background: #fff1f0;
    color: #a32f2a;
    font-size: 13px;
    list-style: none;
}

    .login-validation ul {
        margin: 0;
        padding-left: 18px;
    }

.login-footer {
    margin-top: 23px;
    color: #9b7a84;
    font-size: 13px;
    text-align: center;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .login-card-body {
        padding: 24px 20px;
    }

    .login-brand {
        padding: 26px 18px 22px;
    }
}

.portal-logout-form {
    margin: 0;
}

.portal-navbar .portal-logout-button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.portal-navbar .portal-login-link {
    padding-right: 18px;
    padding-left: 18px;
}

    .portal-navbar .portal-login-link:hover,
    .portal-navbar .portal-logout-button:hover {
        color: #fff;
    }


/* Login page layout correction */

body:has(.login-page) .body-content {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.login-page {
    box-sizing: border-box;
    width: 100%;
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    box-sizing: border-box;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border: 1px solid #e7dfe2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(74, 42, 54, 0.10);
}

    .login-card .login-submit,
    .login-card .btn-primary {
        width: 100%;
        min-height: 46px;
        border: 1px solid #7E4555;
        border-radius: 8px;
        background-color: #7E4555;
        color: #fff;
        font-weight: 600;
    }

        .login-card .login-submit:hover,
        .login-card .login-submit:focus {
            border-color: #603342;
            background-color: #603342;
            color: #fff;
        }

    .login-card .form-control {
        display: block;
        width: 100%;
        box-sizing: border-box;
        min-height: 46px;
        border: 1px solid #dce1e7;
        border-radius: 8px;
        background: #fff;
        color: #29313a;
    }

        .login-card .form-control:focus {
            border-color: #7E4555;
            outline: 0;
            box-shadow: 0 0 0 3px rgba(126, 69, 85, 0.12);
        }

    .login-card .login-brand {
        background: linear-gradient(120deg, #603342, #7E4555);
        border-bottom: 3px solid #c58a45;
        color: #fff;
    }

@media (max-width: 575.98px) {
    .login-page {
        min-height: calc(100vh - 150px);
        padding: 28px 16px;
    }

    .login-card {
        max-width: 420px;
    }
}


/* Login inputs and button: consistent full width */

.login-card-body .login-form .form-group {
    width: 100%;
}

.login-card-body .login-form input.form-control {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.login-card-body .login-form .login-submit {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
}

/* Ensure the form itself uses the full card content width */
.login-card-body .login-form {
    display: block;
    width: 100%;
}

.login-card-body {
    box-sizing: border-box;
    width: 100%;
}



/* =========================================================
   COMPACT DEVOTEE CREATE / EDIT FORMS
   ========================================================= */

/* Give the form more usable horizontal space */
.devotee-page.container {
    max-width: 1320px;
}

.devotee-page .card-body {
    padding: 20px;
}

    /* Reduce excessive spacing between field rows */
    .devotee-page .card-body .row {
        row-gap: 14px;
        margin-bottom: 0;
    }

        .devotee-page .card-body .row > [class*="col-"] {
            min-width: 0;
        }

    /* Make every input fill its available column */
    .devotee-page .card-body .form-control,
    .devotee-page .card-body select.form-control,
    .devotee-page .card-body textarea.form-control {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* Consistent field spacing */
    .devotee-page .card-body .form-group {
        width: 100%;
        min-width: 0;
        margin-bottom: 0;
    }

    .devotee-page .card-body label {
        margin-bottom: 5px;
    }

    .devotee-page .card-body .form-control {
        min-height: 38px;
        padding: 8px 11px;
        font-size: 13px;
    }

    .devotee-page .card-body textarea.form-control {
        min-height: 75px;
    }

/* Compact card headings */
.devotee-page .card-header {
    padding: 12px 18px;
}

/* Improve spacing between cards */
.devotee-page .card + .card {
    margin-top: 16px;
}

/* Tablet: two columns */
@media (max-width: 767.98px) {
    .devotee-page.container {
        max-width: 100%;
    }

    .devotee-page .card-body {
        padding: 16px;
    }

        .devotee-page .card-body .row {
            row-gap: 12px;
        }
}

/* Mobile: one column, no horizontal overflow */
@media (max-width: 575.98px) {
    .devotee-page .card-body .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
    }
}


/* Official ISKCON favicon used as the header logo */

.portal-brand-icon.portal-logo {
    width: 56px;
    height: 48px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    box-shadow: none;
}

    .portal-brand-icon.portal-logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* Smaller header logo on mobile */
@media (max-width: 575.98px) {
    .portal-brand-icon.portal-logo {
        width: 46px;
        height: 42px;
        flex-basis: 46px;
    }
}
