/* =========================================
   BASIC
========================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #f4f7f6;
    color: #1f2937;

    font-family:
        "Noto Sans Bengali",
        "SolaimanLipi",
        Arial,
        sans-serif;
}

a {
    text-decoration: none;
}


/* =========================================
   MAIN LAYOUT
========================================= */

.layout {
    display: flex;
    min-height: 100vh;
}


/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: 260px;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            #064e3b 0%,
            #065f46 50%,
            #022c22 100%
        );

    color: #ffffff;

    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);

    z-index: 1000;
}


/* =========================================
   BRAND
========================================= */

.brand {
    min-height: 88px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 18px 20px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.10);
}

.brand-icon {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #ffffff;
    color: #047857;

    font-size: 25px;

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.12);
}

.brand-text strong {
    display: block;

    font-size: 19px;
    font-weight: 700;
}

.brand-text small {
    display: block;

    margin-top: 3px;

    color: #a7f3d0;

    font-size: 11px;
}


/* =========================================
   SIDEBAR NAVIGATION
========================================= */

.sidebar-nav {
    flex: 1;

    overflow-y: auto;

    padding: 15px 12px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 4px;

    padding: 11px 13px;

    border-radius: 10px;

    color: #d1fae5;

    font-size: 14px;
    font-weight: 500;

    transition: 0.2s ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;

    transform: translateX(2px);
}

.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;

    font-weight: 700;
}

.menu-icon {
    width: 22px;

    display: inline-flex;
    justify-content: center;

    font-size: 18px;
}

.nav-title {
    margin:
        20px 12px
        8px;

    color: #6ee7b7;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.7px;
}


/* =========================================
   SIDEBAR USER
========================================= */

.sidebar-user {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 15px 18px;

    border-top:
        1px solid rgba(255, 255, 255, 0.10);
}

.user-avatar {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.14);

    font-size: 18px;
}

.user-info {
    min-width: 0;
}

.user-info strong {
    display: block;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 13px;
}

.user-info small {
    display: block;

    margin-top: 3px;

    color: #a7f3d0;

    font-size: 10px;
}


/* =========================================
   LOGOUT
========================================= */

.sidebar-logout {
    padding: 0 18px 12px;
}

.sidebar-logout a {
    display: block;

    padding: 9px 12px;

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.08);

    color: #ffffff;

    text-align: center;

    font-size: 12px;
    font-weight: 600;
}

.sidebar-logout a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-version {
    padding: 0 15px 13px;

    color: rgba(255, 255, 255, 0.45);

    text-align: center;

    font-size: 9px;
}


/* =========================================
   MAIN CONTENT
========================================= */

.main {
    width: calc(100% - 260px);

    min-height: 100vh;

    margin-left: 260px;

    padding: 28px;
}


/* =========================================
   TOP HEADER
========================================= */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 22px;
}

.page-header h2 {
    margin: 0;

    color: #1f2937;

    font-size: 21px;
}

.page-header p {
    margin: 5px 0 0;

    color: #6b7280;

    font-size: 12px;
}


/* =========================================
   WELCOME BANNER
========================================= */

.welcome {
    position: relative;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 30px;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #065f46,
            #047857,
            #0f766e
        );

    color: #ffffff;

    box-shadow:
        0 10px 30px rgba(6, 95, 70, 0.18);
}

.welcome::after {
    content: "";

    position: absolute;
    right: -60px;
    top: -80px;

    width: 230px;
    height: 230px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.07);
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome small {
    color: #a7f3d0;

    font-size: 13px;
}

.welcome h1 {
    margin: 5px 0 8px;

    color: #ffffff;

    font-size: 27px;
}

.welcome p {
    max-width: 650px;

    margin: 0;

    color: #d1fae5;

    font-size: 13px;

    line-height: 1.7;
}


/* =========================================
   BUTTONS
========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 17px;

    border: 0;
    border-radius: 10px;

    cursor: pointer;

    font-size: 13px;
    font-weight: 700;
}

.btn-light {
    position: relative;
    z-index: 2;

    background: #ffffff;
    color: #047857;

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.10);
}

.btn-light:hover {
    background: #ecfdf5;
}

.btn-primary {
    background: #047857;
    color: #ffffff;
}

.btn-primary:hover {
    background: #065f46;
}


/* =========================================
   DASHBOARD CARDS
========================================= */

.cards {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-top: 22px;
}

.card {
    position: relative;

    overflow: hidden;

    min-height: 125px;

    padding: 20px;

    border: 1px solid #edf1ef;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.04);
}

.card-label {
    color: #6b7280;

    font-size: 12px;
    font-weight: 600;
}

.card-number {
    margin-top: 12px;

    color: #064e3b;

    font-size: 30px;
    font-weight: 800;
}

.card-icon {
    position: absolute;

    right: 16px;
    bottom: 14px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #ecfdf5;
    color: #047857;

    font-size: 20px;
}


/* =========================================
   CONTENT PANEL
========================================= */

.panel {
    margin-top: 22px;

    overflow: hidden;

    border: 1px solid #edf1ef;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.04);
}

.panel-header {
    padding: 17px 20px;

    border-bottom: 1px solid #f0f2f1;

    font-size: 14px;
    font-weight: 700;
}

.panel-body {
    padding: 20px;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1100px) {

    .cards {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 768px) {

    .sidebar {
        width: 215px;
    }

    .main {
        width: calc(100% - 215px);

        margin-left: 215px;

        padding: 18px;
    }

    .welcome {
        flex-direction: column;
        align-items: flex-start;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 560px) {

    .sidebar {
        position: relative;

        width: 100%;
        min-height: auto;
    }

    .layout {
        display: block;
    }

    .main {
        width: 100%;

        margin-left: 0;

        padding: 15px;
    }

    .sidebar-nav {
        max-height: none;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;

        gap: 10px;
    }
}


/* =========================================
   MODERN DASHBOARD CARDS
========================================= */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0;
}

.dash-card {
    position: relative;
    min-height: 145px;
    padding: 22px;

    border-radius: 18px;
    overflow: hidden;

    text-decoration: none;
    color: #fff;

    box-shadow: 0 10px 30px rgba(15, 23, 42, .10);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.dash-card::before {
    content: "";
    position: absolute;

    width: 120px;
    height: 120px;

    right: -35px;
    top: -40px;

    border-radius: 50%;

    background: rgba(255,255,255,.10);
}

.dash-card::after {
    content: "";
    position: absolute;

    width: 90px;
    height: 90px;

    right: 25px;
    bottom: -55px;

    border-radius: 50%;

    background: rgba(255,255,255,.08);
}

.dash-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
}


/* Card backgrounds */

.dash-card-nikah {
    background:
        linear-gradient(
            135deg,
            #064e3b,
            #059669
        );
}

.dash-card-today {
    background:
        linear-gradient(
            135deg,
            #92400e,
            #d97706
        );
}

.dash-card-verified {
    background:
        linear-gradient(
            135deg,
            #065f46,
            #10b981
        );
}

.dash-card-disabled {
    background:
        linear-gradient(
            135deg,
            #7f1d1d,
            #dc2626
        );
}


/* Card content */

.dash-card-content {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 17px;
}

.dash-icon {
    width: 58px;
    height: 58px;

    flex: 0 0 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: rgba(255,255,255,.17);

    border: 1px solid rgba(255,255,255,.18);

    font-size: 28px;

    backdrop-filter: blur(6px);
}

.dash-label {
    font-size: 14px;
    font-weight: 700;

    opacity: .92;
}

.dash-number {
    margin: 3px 0;

    font-family: Arial, sans-serif;

    font-size: 34px;
    line-height: 1;

    font-weight: 800;
}

.dash-note {
    font-size: 11px;
    opacity: .75;
}

.dash-arrow {
    position: absolute;

    right: 18px;
    bottom: 15px;

    z-index: 3;

    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255,255,255,.15);

    font-family: Arial, sans-serif;

    transition: .25s;
}

.dash-card:hover .dash-arrow {
    transform: translateX(4px);
    background: rgba(255,255,255,.25);
}


/* Tablet */

@media (max-width: 1100px) {

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* Mobile */

@media (max-width: 600px) {

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   DASHBOARD ADMIN PROFILE
========================================= */

.dashboard-profile {
    min-width: 210px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 8px 13px;

    background: #ffffff;

    border: 1px solid #e4ebe8;
    border-radius: 14px;

    text-decoration: none;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, .06);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.dashboard-profile:hover {
    transform: translateY(-2px);

    box-shadow:
        0 9px 25px rgba(15, 23, 42, .10);
}


/* PHOTO */

.dashboard-profile-photo {
    width: 48px;
    height: 48px;

    flex: 0 0 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 50%;

    border: 2px solid #d8a520;

    background:
        linear-gradient(
            135deg,
            #064e3b,
            #059669
        );

    color: #fff;

    font-size: 19px;
    font-weight: bold;
}

.dashboard-profile-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* INFORMATION */

.dashboard-profile-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.dashboard-profile-info strong {
    max-width: 150px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: #153f34;

    font-size: 13px;
}

.dashboard-profile-info span {
    margin-top: 1px;

    color: #64748b;

    font-size: 10px;
}

.dashboard-profile-info small {
    margin-top: 3px;

    color: #b47c09;

    font-size: 9px;
    font-weight: bold;
}


/* MOBILE */

@media(max-width: 600px) {

    .dashboard-profile {
        min-width: auto;
        padding: 6px;
    }

    .dashboard-profile-info span,
    .dashboard-profile-info small {
        display: none;
    }

    .dashboard-profile-photo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
}

/* =========================================
   SMALL USER STATISTIC CARDS
========================================= */

.user-mini-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;

    margin: 12px 0 24px;
}


/* CARD */

.user-mini-card {
    min-height: 82px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 13px 16px;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 13px;

    box-shadow:
        0 4px 14px rgba(15, 23, 42, .05);

    position: relative;
    overflow: hidden;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}


/* GOLD LINE */

.user-mini-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;

    background: #d7a323;
}


.user-mini-card:hover {
    transform: translateY(-3px);

    border-color: #d6c58f;

    box-shadow:
        0 9px 22px rgba(15, 23, 42, .09);
}


/* ICON */

.user-mini-icon {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #fff7dd;
    color: #a66b00;

    font-family: Arial, sans-serif;
    font-size: 19px;
    font-weight: bold;
}


/* ACTIVE */

.user-mini-icon.active {
    background: #dcfce7;
    color: #15803d;
}


/* INACTIVE */

.user-mini-icon.inactive {
    background: #fee2e2;
    color: #dc2626;
}


/* ROLE */

.user-mini-icon.role {
    background: #e0f2fe;
    color: #0369a1;
}


/* TEXT */

.user-mini-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.user-mini-info span {
    margin-bottom: 2px;

    color: #64748b;

    font-size: 11px;
    font-weight: 600;
}

.user-mini-info strong {
    color: #0f3d32;

    font-family: Arial, sans-serif;

    font-size: 23px;
    line-height: 1.15;
    font-weight: 800;
}


/* ROLE TEXT */

.user-mini-info .role-name {
    font-size: 15px;
}


/* RESPONSIVE */

@media (max-width: 1000px) {

    .user-mini-cards {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 550px) {

    .user-mini-cards {
        grid-template-columns: 1fr;
    }

}
.user-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.permission-link {
    display: inline-block;

    padding: 7px 10px;

    border-radius: 7px;

    background: #fff7ed;
    color: #c2410c;

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;
}

.permission-link:hover {
    background: #ffedd5;
}

/* =========================================
   ACTION BUTTON COLORS
========================================= */

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 7px 11px;
    border: none;
    border-radius: 7px;

    text-decoration: none;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
    transition: all .2s ease;
}

/* দেখুন - Blue */
.action-view {
    background: #dbeafe;
    color: #1d4ed8;
}

.action-view:hover {
    background: #2563eb;
    color: #fff;
}

/* বাংলা সম্পাদনা - Orange */
.action-edit {
    background: #ffedd5;
    color: #c2410c;
}

.action-edit:hover {
    background: #f97316;
    color: #fff;
}

/* বাংলা Print - Green */
.action-print {
    background: #dcfce7;
    color: #15803d;
}

.action-print:hover {
    background: #16a34a;
    color: #fff;
}

/* English Print - Dark Blue */
.action-english {
    background: #e0e7ff;
    color: #4338ca;
}

.action-english:hover {
    background: #4f46e5;
    color: #fff;
}

/* Edit English - Purple */
.action-english-edit {
    background: #f3e8ff;
    color: #7e22ce;
}

.action-english-edit:hover {
    background: #9333ea;
    color: #fff;
}

/* Delete - Red */
.action-delete {
    background: #fee2e2;
    color: #b91c1c;

    font-family: inherit;
}

.action-delete:hover {
    background: #dc2626;
    color: #fff;
}

.delete-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
}


.auto-field {
    background: #f3f4f6 !important;
    color: #374151 !important;
    font-weight: 700;
    cursor: not-allowed;
}

.auto-field:focus {
    border-color: #d1d5db !important;
    box-shadow: none !important;
}
/* =========================================
   SIDEBAR HIDE / SHOW
========================================= */

.sidebar {
    transition: width .3s ease,
                transform .3s ease,
                opacity .3s ease;
}

/* Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;

    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 10px;

    background: #047857;
    color: #fff;

    font-size: 22px;
    font-weight: bold;

    cursor: pointer;

    z-index: 9999;

    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

/* Sidebar বন্ধ */
body.sidebar-hidden .sidebar {
    width: 0 !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;

    overflow: hidden;

    opacity: 0;
    transform: translateX(-100%);
}

/* Main content পুরো জায়গা নেবে */
body.sidebar-hidden .main {
    width: 100%;
    margin-left: 0 !important;
}

/* =========================================
   MOBILE RESPONSIVE SIDEBAR
========================================= */

.sidebar {
    transition: transform .3s ease;
}

/* Desktop */
.sidebar-toggle {
    position: fixed;
    top: 15px;
    left: 15px;

    width: 42px;
    height: 42px;

    border: 0;
    border-radius: 10px;

    background: #047857;
    color: #fff;

    font-size: 22px;
    cursor: pointer;

    z-index: 10001;

    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

    .layout {
        display: block;
    }

    .sidebar {
        position: fixed !important;

        top: 0;
        left: 0;
        bottom: 0;

        width: 260px !important;
        height: 100vh;

        z-index: 10000;

        overflow-y: auto;

        transform: translateX(-100%);

        box-shadow: 5px 0 20px rgba(0,0,0,.18);
    }

    /* Sidebar open */
    body.mobile-sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Main content */
    .main {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Toggle button */
    .sidebar-toggle {
        top: 10px;
        left: 10px;

        width: 40px;
        height: 40px;
    }


    /* Dark background overlay */
    .sidebar-overlay {
        display: none;

        position: fixed;
        inset: 0;

        background: rgba(0,0,0,.40);

        z-index: 9999;
    }

    body.mobile-sidebar-open .sidebar-overlay {
        display: block;
    }
}