/* Portal specific styling extending styles.css */

.portal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #080c14; /* Deep space dark */
    margin: 0;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Premium Animated Background Gradients */
.portal-body::before, .portal-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    animation: drift 15s infinite alternate ease-in-out;
}

.portal-body::before {
    width: 70vw;
    height: 70vh;
    background-color: rgba(37, 99, 235, 0.4); /* Blue */
    top: -20%;
    left: -20%;
}

.portal-body::after {
    width: 60vw;
    height: 60vh;
    background-color: rgba(14, 165, 233, 0.35); /* Sky Blue */
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

.portal-container {
    width: 100%;
    max-width: 440px;
    padding: 2rem;
    box-sizing: border-box;
    position: relative;
    z-index: 10; /* Above gradients */
}

.portal-card {
    background-color: rgba(16, 21, 33, 0.7); /* Translucent background */
    backdrop-filter: blur(20px); /* Glassmorphism */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08); /* Lighter subtle border */
    border-radius: 16px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portal-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.portal-card h2 {
    color: var(--text-color);
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.portal-sub {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.portal-form .input-group {
    margin-bottom: 1.5rem;
}

.portal-form label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.portal-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.portal-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 2px rgba(150, 199, 226, 0.2);
}

.w-100 {
    width: 100%;
    box-sizing: border-box;
}

.portal-footer {
    margin-top: 2rem;
    text-align: center;
}

.portal-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.portal-footer a:hover {
    color: var(--primary-color);
}

.error-msg {
    color: #ef4444; /* Red color for error */
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
    min-height: 1.2rem;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Styling */
.dashboard-layout {
    display: flex;
    height: 100vh;
    background-color: #080c14;
    color: var(--text-color, #ffffff);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Dashboard Animated Background Gradients */
.dashboard-layout::before, .dashboard-layout::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    animation: drift-dashboard 20s infinite alternate ease-in-out;
}

.dashboard-layout::before {
    width: 60vw;
    height: 60vh;
    background-color: rgba(37, 99, 235, 0.35); /* Blue */
    top: -15%;
    left: 10%;
}

.dashboard-layout::after {
    width: 50vw;
    height: 50vh;
    background-color: rgba(14, 165, 233, 0.3); /* Sky Blue */
    bottom: -15%;
    right: 5%;
    animation-delay: -10s;
}

@keyframes drift-dashboard {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(80px, -50px) scale(1.15);
    }
}

.dashboard-sidebar {
    width: 260px;
    background-color: rgba(16, 21, 33, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-sizing: border-box;
    z-index: 50;
    overflow-y: auto;
}

.dashboard-sidebar .logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.nav-links li {
    margin-bottom: 1rem;
}

.nav-links a {
    color: var(--text-muted, #94a3b8);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    display: block;
    padding: 0.5rem 0;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color, #60a5fa);
}

.logout-btn {
    background: transparent;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    color: var(--text-color);
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-main {
    flex-grow: 1;
    padding: 3rem;
    margin-left: 260px;
    width: calc(100% - 260px);
    box-sizing: border-box;
    overflow-y: auto;
    height: 100vh;
    position: relative;
    z-index: 10;
}

.dashboard-header {
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    margin: 0 0 0.5rem 0;
}

.dashboard-header p {
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.status-card {
    background-color: rgba(16, 21, 33, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeUp 0.5s ease-out;
}

.status-card h3 {
    margin: 0 0 1rem 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--text-color, #ffffff);
}

.status-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted, #94a3b8);
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--primary-color, #60a5fa);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    margin-top: 0.5rem;
    cursor: pointer;
    text-decoration: underline;
}

.read-more-btn:hover {
    color: #93c5fd;
}

/* Delete Button for Admin Preview */
.delete-update-btn {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.delete-update-btn:hover {
    opacity: 1;
}
.delete-update-btn svg {
    width: 18px;
    height: 18px;
}

/* Fullscreen Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(8, 12, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none; /* hidden by default */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content-box {
    background-color: rgba(16, 21, 33, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    animation: fadeUp 0.4s ease-out;
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.modal-date {
    font-size: 0.9rem;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 2rem;
}

.modal-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color, #ffffff);
    white-space: pre-wrap;
}

.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    width: 100%;
}
.skeleton-text.short {
    width: 60%;
}
