/* Identity Theme Variables */
:root {
    --identity-success: #3ef060; /* Brighter green for dark theme */
    --identity-danger: #ff7676;  /* Brighter red for dark theme */
    --identity-success-bg: rgba(62, 240, 96, 0.1);
    --identity-danger-bg: rgba(255, 118, 118, 0.1);
}

body.light-theme {
    --identity-success: #1e7e34; /* Darker green for light theme */
    --identity-danger: #bd2130;  /* Darker red for light theme */
    --identity-success-bg: rgba(40, 167, 69, 0.1);
    --identity-danger-bg: rgba(220, 53, 69, 0.1);
}

/* Identity Status Alert Styles */
.status-alert {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid;
    font-weight: 500;
    font-size: 0.85rem;
    animation: slideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transition: opacity 0.5s ease, transform 0.5s ease, margin-top 0.5s ease;
}

.inline-msg-container {
    display: flex !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 1.5rem 0 0 0 !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1rem !important;
}

.inline-msg-container li {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.status-alert.msg-success {
    background: var(--identity-success-bg);
    border-color: rgba(62, 240, 96, 0.2);
    color: var(--identity-success);
}

.status-alert.msg-danger {
    background: var(--identity-danger-bg);
    border-color: rgba(255, 118, 118, 0.2);
    color: var(--identity-danger);
}

.status-alert.fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    margin-top: -3rem; /* Smoothly collapse space */
}

.close-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit !important;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
    margin-left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}

/* Sidebar Button Text Wrapping Fix */
.actions.stacked li a.button {
    white-space: normal !important;
    height: auto !important;
    line-height: 1.3 !important;
    padding: 0.75rem 1rem !important;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    font-size: 1.3rem !important;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input with Icon Alignment Fix */
.input-with-icon {
    position: relative;
    display: block;
    width: 100%;
}

.input-with-icon input {
    width: 100% !important;
    padding-right: 3rem !important;
}

.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 5;
}

.success-icon {
    color: #98ffad;
}

/* Disabled Button Style */
.button:disabled, 
.button.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
    filter: grayscale(1);
}

/* Validation Message Styling */
.field-validation-error {
    color: var(--identity-danger);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
    animation: slideIn 0.3s ease-out;
}

.validation-summary-errors {
    background: var(--identity-danger-bg);
    border: 1px solid rgba(255, 118, 118, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.validation-summary-errors ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.validation-summary-errors li {
    color: var(--identity-danger);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.validation-summary-errors li:last-child {
    margin-bottom: 0;
}

.validation-summary-errors li::before {
    content: "\f06a"; /* FontAwesome exclamation circle */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.5rem;
}

.slide-in-bottom {
    animation: slideInBottom 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Access Denied Page */
.access-denied-container {
    display: flex;
    flex-wrap: wrap;
    min-height: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow-hover, 0 4px 15px rgba(0,0,0,0.1));
    margin: 2rem auto;
    max-width: 600px;
}

.access-denied-left {
    flex: 1 1 200px;
    background-color: var(--identity-danger);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    text-align: center;
}

.access-denied-left i {
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.9);
    font-size: 2.5em; /* Smaller icon */
}

.access-denied-left h2 {
    color: white !important;
    margin: 0;
    border-bottom: none !important;
    font-size: 1.25rem; /* Smaller heading */
}

.access-denied-right {
    flex: 2 1 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    background-color: var(--bg-card, #ffffff);
    color: var(--text-main, inherit);
}

.access-denied-right h3 {
    margin-bottom: 0.75rem;
    color: var(--identity-danger);
    font-size: 1.25rem;
}
.access-denied-right p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
