.app-shell {
    height: 100vh;
    display: flex;
    background: var(--sipedy-bg);
    overflow: hidden;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1;
    padding: 1rem;
    display: grid;
    gap: 1rem;
    overflow-y: auto;
    align-content: start;
}

.sidebar {
    width: 268px;
    background: linear-gradient(180deg, rgb(1, 36, 72) 0%, #0d3966 100%);
    color: white;
    padding: 12px 14px;
    position: relative;
    height: 100vh;
    overflow-y: auto;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.sidebar-header {
    display: grid;
    justify-items: center;
    padding: 6px 0 30px;
}

.sidebar-logo {
    width: 146px;
    max-width: 100%;
    object-fit: contain;
}

.sidebar-nav {
    display: grid;
    gap: .22rem;
}

.sidebar-mobile-logout {
    display: none;
    margin-top: .5rem;
}

.sidebar-mobile-logout .sidebar-item {
    width: 100%;
    border: 0;
    background: rgba(255, 255, 255, .08);
    cursor: pointer;
    text-align: left;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: .68rem;
    padding: .68rem .72rem .68rem 30px;
    border-radius: 14px;
    color: rgba(255, 255, 255, .96);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-item-icon {
    width: 24px;
    height: 24px;
    opacity: 1;
    flex: 0 0 24px;
    filter: brightness(0) invert(1);
}

.sidebar-item.active,
.sidebar-item:hover {
    background: rgba(255, 255, 255, .16);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.4rem;
    background: white;
    border-bottom: 1px solid var(--sipedy-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-brand,
.topbar-actions,
.topbar-user {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.topbar-brand-copy {
    display: grid;
    gap: .08rem;
}

.back-button {
    padding: .45rem .72rem;
    border-radius: 12px;
    white-space: nowrap;
}

.back-button svg {
    width: 16px;
    height: 16px;
}

.topbar-title {
    font-size: .98rem;
    font-weight: 600;
    color: #23314b;
}

.topbar-actions {
    gap: 16px;
}

.topbar-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e3e8ef;
    background: #f8fafc;
    color: #1f2933;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.topbar-bell svg {
    width: 20px;
    height: 20px;
}

.topbar-notifications {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
    padding: 0 5px;
}

.notification-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(460px, calc(100vw - 32px));
    padding: 14px;
    border-radius: 16px;
    box-shadow: var(--sipedy-shadow);
    z-index: 20;
}

.topbar-logout {
    display: inline-flex;
}

.notification-popover-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.notification-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.notification-popover-title {
    display: grid;
    gap: 4px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 340px;
    overflow: auto;
    padding-right: 4px;
}

.notification-item {
    text-align: left;
    border: 1px solid var(--sipedy-border);
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
}

.notification-item.unread {
    background: #eef4ff;
    border-color: #93c5fd;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.notification-item-title {
    font-weight: 600;
    color: #1e293b;
}

.notification-item-date {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.notification-item-preview {
    font-size: 13px;
    color: #475569;
}

.notification-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
    gap: 1.25rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.settings-card {
    display: grid;
    gap: .8rem;
    padding: 1.15rem;
    position: relative;
    overflow: hidden;
}

.settings-card strong {
    font-size: 1.15rem;
    line-height: 1.2;
}

.settings-card-header {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    align-items: center;
}

.settings-card-header span {
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
}

.settings-card-header img {
    width: 28px;
    height: 28px;
}

.metric-card .settings-card-header img {
    filter: brightness(0) invert(1);
    opacity: .96;
}

.finance-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
    padding: .4rem;
    border-radius: 18px;
    background: rgba(11, 42, 74, .06);
    width: fit-content;
}

.finance-tab {
    padding: .65rem 1rem;
    border-radius: 14px;
    color: var(--sipedy-blue);
    font-weight: 600;
}

.finance-tab.active {
    background: linear-gradient(135deg, #0b2a4a 0%, #1f6fb2 100%);
    color: #fff;
    box-shadow: var(--sipedy-shadow);
}

.notification-send-form,
.notification-group-form,
.notification-list-page {
    display: grid;
    gap: 1rem;
}

.notification-recipient-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.notification-recipient-card,
.notification-group-card {
    display: grid;
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--sipedy-border);
    border-radius: 16px;
    background: #f8fafc;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
}

.inline-checkbox {
    justify-content: flex-start;
}

.notification-check-option,
.notification-inline-toggle {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    justify-content: start;
    gap: .7rem;
}

.notification-check-option {
    padding: .35rem .2rem;
    border-radius: 10px;
}

.notification-check-option:hover {
    background: rgba(31, 111, 178, 0.05);
}

.notification-check-option input,
.notification-inline-toggle input {
    width: 16px;
    height: 16px;
    margin: .1rem 0 0;
}

.checkbox-text {
    line-height: 1.45;
}

.notification-recipient-card {
    align-content: start;
    min-height: 180px;
}

.notification-inline-toggle {
    margin-top: .15rem;
    padding: .5rem .65rem;
    border: 1px solid var(--sipedy-border);
    border-radius: 12px;
    background: #f8fafc;
}

.notification-member-row {
    align-items: center;
}

.notification-group-list,
.notification-group-members {
    display: grid;
    gap: 1rem;
}

.notification-entry {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--sipedy-border);
    border-radius: 18px;
    background: #f8fafc;
}

.notification-entry-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.notification-entry-header h2 {
    margin: .5rem 0 0;
    font-size: 1.15rem;
}

.notification-entry-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .6rem;
    align-items: center;
}

.notification-entry-body {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.7;
    color: #334155;
}

.notification-detail-card {
    max-width: 960px;
}

.topbar-support {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e3e8ef;
    background: #f8fafc;
    color: #1f2933;
}

.topbar-support:hover {
    background: #eef2f7;
    border-color: #cbd5e1;
}

.topbar-support-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-support-icon svg {
    width: 18px;
    height: 18px;
}

.topbar-support-text {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    line-height: 1;
    white-space: nowrap;
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #0b2a4a;
}

.topbar-user-text {
    display: grid;
}

.topbar-user-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

.topbar-user-email {
    font-size: 10px;
    color: #64748b;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem 1.5rem;
    color: var(--sipedy-muted);
}

.auth-body {
    min-height: 100vh;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 45%) minmax(320px, 55%);
    background: #f4f7fb;
}

.auth-visual {
    display: grid;
    place-items: center;
    padding: 32px 32px 20px;
    color: white;
    background: rgb(1, 36, 72);
    overflow: hidden;
}

.auth-visual-content {
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.auth-logo {
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25));
    max-width: 90%;
}

.auth-logo-large {
    width: 680px;
}

.auth-visual-text {
    width: min(560px, 100%);
}

.auth-visual-text h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
}

.auth-visual-text p {
    margin: .9rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
}

.auth-panel {
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 32px 32px 40px;
    gap: 24px;
    background: linear-gradient(135deg, #f7f9fc 0%, #eef3f8 100%);
}

.auth-card {
    width: min(440px, 100%);
    background: white;
    padding: 32px;
    border-radius: 18px;
    box-shadow: var(--sipedy-shadow);
    border: 1px solid rgba(15, 44, 77, 0.08);
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-form-header h1 {
    margin: 0;
    font-size: 20px;
}

.auth-form-header p {
    margin: 6px 0 0;
    font-size: 13px;
    color: #4b5563;
}

.auth-field {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #1f2937;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    border-radius: 10px;
    border: 1px solid #d9e1ec;
    background: #f7f9fc;
    font-size: 13px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(31, 111, 178, 0.8);
    box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.15);
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: #64748b;
}

.input-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.auth-error {
    color: #b02121;
    font-size: 12px;
}

.auth-submit {
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--sipedy-green) 0%, var(--sipedy-green-dark) 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.auth-support {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    justify-self: center;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(31, 111, 178, 0.25);
    background: rgba(31, 111, 178, 0.06);
    color: #145488;
}

.auth-support-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-support-icon svg {
    width: 16px;
    height: 16px;
}

.auth-support-label {
    font-size: 12px;
    font-weight: 700;
}

.auth-support-email {
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
}

.auth-footer {
    font-size: 12px;
    color: #6b7280;
}

.icon-button {
    display: inline-grid;
    gap: .2rem;
    background: transparent;
    border: 0;
    padding: .5rem;
}

.icon-button span {
    width: 20px;
    height: 2px;
    background: var(--sipedy-blue);
}

.mobile-only {
    display: none;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: min(420px, calc(100vw - 2rem));
    z-index: 30;
    display: grid;
    gap: .7rem;
}

.toast {
    box-shadow: 0 16px 34px rgba(8, 34, 66, 0.16);
    border: 1px solid rgba(8, 34, 66, 0.08);
    transition: opacity .25s ease, transform .25s ease;
}

.toast.is-closing {
    opacity: 0;
    transform: translateY(8px);
}
