/* Client Portal Styles */

:root {
    --primary: #006eff;
    --secondary: #000000;
    --dark: #1c1c1c;
    --light: #ffffff;
    --gray: #4a4a4aa1;
    --accent-glow: #1E90FF;
    --danger: #dc3545;
    --warning: #ffc107;
    --success: #28a745;
    --info: #17a2b8;
}

/* LOGIN SECTION */
.login-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-section.active {
    opacity: 1;
    visibility: visible;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 50px 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(0, 110, 255, 0.5));
}

.login-header h1 {
    font-size: 2rem;
    color: var(--light);
    margin-bottom: 8px;
}

.login-header p {
    color: #bdbdbd;
    font-size: 0.95rem;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 300;
    margin-bottom: 8px;
    color: #bdbdbd;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 110, 255, 0.3);
    border-radius: 8px;
    color: var(--light);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 110, 255, 0.3);
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 45px;
    cursor: pointer;
    color: #bdbdbd;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary);
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.btn-login {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: var(--light);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 110, 255, 0.3);
}

.login-footer {
    margin-top: 25px;
    text-align: center;
}

.login-footer p {
    color: #bdbdbd;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #66b3ff;
}

.forgot-link {
    display: block;
    margin-top: 12px;
}

.login-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    margin-top: 25px;
}

.login-info p {
    color: #bdbdbd;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-info i {
    color: var(--primary);
}

/* DASHBOARD SECTION */
.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-header {
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 110, 255, 0.2);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-top: 80px;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    gap: 30px;
}

.portal-logo img {
    width: 130px;
    height: auto;
}

.header-info h1 {
    color: var(--light);
    font-size: 1.5rem;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-name {
    color: #bdbdbd;
    font-size: 0.95rem;
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 400;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* PROJECTS VIEW */
.projects-view {
    padding: 11.2px 16.3px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 110, 255, 0) 100%);
}

.projects-header {
    text-align: center;
    margin-bottom: 9.2px;
}

.projects-header h2 {
    font-size: 1.33rem;
    color: var(--light);
    margin-bottom: 3px;
    font-weight: 400;
    letter-spacing: -1px;
}

.projects-header p {
    color: #bdbdbd;
    font-size: 0.765rem;
    max-width: 600px;
    margin: 0 auto;
}

.projects-nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 9.2px;
    padding: 6px 0;
    background: transparent;
    border-radius: 0;
    border: none;
    gap: 22.4px;
    margin-left: 45%;
}

.nav-counter {
    color: #bdbdbd;
    font-size: 0.918rem;
    font-weight: 400;
    opacity: 0.9;
}

.nav-counter span {
    color: var(--primary);
    font-weight: 400;
}

.nav-buttons {
    display: flex;

    gap: 6px;
    
}

.nav-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 110, 255, 0.5);
    background: rgba(0, 110, 255, 0.1);
    color: var(--primary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}


.nav-btn:hover:not(:disabled) {
    background: rgba(0, 110, 255, 0.2);
    border-color: var(--primary);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11.2px;
    max-width: 100%;
    margin: 0 auto;
    
    perspective: 1000px;
}

.project-card {
    background: rgba(255, 255, 255, 0.04);
    
    border-radius: 10px;
    padding: 10.2px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 7.14px;
    backdrop-filter: blur(10px);
    position: relative;
    min-height: auto;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 110, 255, 0.1) 0%, rgba(30, 144, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: rgba(255, 255, 255, 0.07);

    
    animation: live-glow 1.6s ease-in-out infinite alternate;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:not(:hover) {
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
}

.project-card.glow-selected {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(0, 110, 255, 0.6), 0 0 80px rgba(0, 110, 255, 0.3), inset 0 0 20px rgba(0, 110, 255, 0.15);
    transform: scale(1.02);
}

.project-card.glow-selected::before {
    opacity: 1;
}

.project-card.glow-selected .project-icon {
    transform: scale(1.2) rotate(5deg);
    box-shadow: 0 12px 30px rgba(0, 110, 255, 0.5);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    gap: 13.3px;
    position: relative;
    z-index: 2;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(0, 110, 255, 0.4) 0%, rgba(30, 144, 255, 0.2) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24.5px;
    color: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(0, 110, 255, 0.2);
    transition: all 0.4s ease;
}

.project-card:hover .project-icon {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 24px rgba(0, 110, 255, 0.35);
}

.project-title {
    flex: 1;
}

.project-title h3 {
    color: var(--light);
    font-size: 1.051rem;
    margin-bottom: 4.4px;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.project-type {
    color: #bdbdbd;
    font-size: 0.877rem;
    line-height: 1.3;
}

.project-status-badge {
    padding: 4.1px 11.2px;
    background: rgba(40, 167, 69, 0.25);
    color: var(--success);
    border-radius: 20px;
    font-size: 0.714rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
}

.project-card:hover .project-status-badge {
    background: rgba(40, 167, 69, 0.35);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.project-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9.2px;
    font-size: 0.877rem;
    color: #bdbdbd;
    position: relative;
    z-index: 2;
    opacity: 0.9;
    transition: opacity 0.4s ease;
    
}

.project-card:hover .project-info {
    opacity: 1;
}

.project-info-item {
    display: flex;
    align-items: center;
    gap: 7.1px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.project-card:hover .project-info-item {
    background: rgba(0, 110, 255, 0.1);
}

.project-info-item i {
    color: var(--primary);
    min-width: 16px;
}

.project-risks {
    padding-top: 13.3px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.project-risks span {
    color: #bdbdbd;
    font-size: 0.877rem;
    font-weight: 400;
}

.risk-indicator {
    display: flex;
    gap: 10px;
    align-items: center;
    transition: transform 0.3s ease;
}

.project-card:hover .risk-indicator {
    transform: scale(1.15);
}

/* DASHBOARD CARDS SECTION */
.dashboard-cards-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11.2px;
    margin-top: 22.4px;
    perspective: 1000px;
}

@keyframes trainMove {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes live-glow {
    0% {
        box-shadow: 0 0 5px var(--accent-glow), 0 0 10px rgba(30, 143, 255, 0.438);
    }
    50% {
        box-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-glow), 0 10px 30px rgba(30, 143, 255, 0.534);
    }
    100% {
        box-shadow: 0 0 5px var(--accent-glow), 0 0 10px rgba(30, 144, 255, 0.5);
    }
}


.billing-card {
    grid-column: 1;
    grid-row: 1 / 3;
    position: relative;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
}

.billing-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    background: conic-gradient(from 0deg,
        rgba(0, 110, 255, 0.3) 0deg,
        rgba(0, 110, 255, 0.3) 40deg,
        #006eff 50deg,
        #1E90FF 90deg,
        #0099ff 100deg,
        rgba(0, 110, 255, 0.3) 110deg,
        rgba(0, 110, 255, 0.3) 360deg
    );
    animation: trainMove 6s linear infinite;
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, transparent calc(100% - 4px), black calc(100% - 4px), black calc(100% - 1px), transparent 100%);
    mask-image: radial-gradient(ellipse at 50% 50%, transparent calc(100% - 4px), black calc(100% - 4px), black calc(100% - 1px), transparent 100%);
    pointer-events: none;
    z-index: 10;
    
}

.dashboard-card-vertical-container {
    display: grid;
    grid-template-rows: 1fr 11.2px 1fr;
    gap: 0;
    grid-column: 2;
    grid-row: 1 / 3;
}

.governance-card {
    grid-row: 1;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
    
}

.secondary-card {
    grid-row: 3;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 110, 255, 0.15);
    border-radius: 10px;
    padding: 19.4px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 110, 255, 0.1) 0%, rgba(30, 144, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.dashboard-card:hover {
    transform: translateY(-12px) scale(1.01);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    box-shadow: 0 25px 60px rgba(0, 110, 255, 0.25), 0 0 40px rgba(0, 110, 255, 0.15);
    animation: live-glow 1.6s ease-in-out infinite alternate;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.billing-card-header {
    display: flex;
    align-items: center;
    gap: 11.2px;
    margin-bottom: 16.3px;
}

.billing-card-header i {
    color: var(--primary);
    font-size: 22.4px;
}

.billing-card-header h3 {
    color: var(--light);
    font-size: 1.224rem;
    margin: 0;
    font-weight: 300;
}

.billing-amount {
    color: var(--light);
    font-size: 1.632rem;
    font-weight: 100;
    margin-bottom: 13.3px;
}

.billing-currency {
    font-size: 1.2rem;
    color: var(--primary);
    margin-right: 5px;
}

.billing-summary {
    background: rgba(0, 110, 255, 0.08);
    border-left: 3px solid var(--primary);
    padding: 13.3px;
    border-radius: 6px;
    margin-bottom: 13.3px;
}

.billing-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    color: #bdbdbd;
    font-size: 0.877rem;
}

.billing-summary-item:last-child {
    margin-bottom: 0;
}

.billing-summary-label {
    color: #bdbdbd;
}

.billing-summary-value {
    color: var(--light);
    font-weight: 300;
}

.billing-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.billing-item {
    display: flex;
    justify-content: space-between;
    padding: 6.1px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.816rem;
}

.billing-item:last-child {
    border-bottom: none;
}

.billing-item-name {
    color: #bdbdbd;
}

.billing-item-cost {
    color: var(--primary);
    font-weight: 400;
}

.billing-warning {
    display: flex;
    gap: 11.2px;
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid var(--warning);
    padding: 11.2px;
    border-radius: 6px;
    margin-top: 13.3px;
}

.warning-icon {
    flex-shrink: 0;
}

.warning-icon i {
    color: var(--warning);
    font-size: 15.3px;
}

.warning-text {
    flex: 1;
}

.warning-text p {
    margin: 0 0 4px 0;
    color: #bdbdbd;
    font-size: 0.816rem;
    line-height: 1.3;
}

.warning-text p:last-child {
    margin-bottom: 0;
}

.billing-summary-item:last-child {
    margin-bottom: 0;
}

.warning-text strong {
    color: var(--warning);
}

.governance-card-header {
    display: flex;
    align-items: center;
    gap: 11.2px;
    margin-bottom: 13.3px;
}

.governance-card-header i {
    color: var(--primary);
    font-size: 19.4px;
}

.governance-card-header h3 {
    color: var(--light);
    font-size: 1.102rem;
    margin: 0;
    font-weight: 300;
}

.governance-content {
    display: flex;
    flex-direction: column;
    gap: 10.2px;
}

.governance-item {
    display: flex;
    align-items: center;
    gap: 9.2px;
    padding: 9.2px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 5px;
}

.governance-item i {
    color: var(--success);
    font-size: 13.3px;
    min-width: 13.3px;
}

.governance-item-text {
    color: #bdbdbd;
    font-size: 0.877rem;
    line-height: 1.2;
}

.secondary-card-header {
    display: flex;
    align-items: center;
    gap: 11.2px;
    margin-bottom: 13.3px;
}

.secondary-card-header i {
    color: var(--primary);
    font-size: 19.4px;
}

.secondary-card-header h3 {
    color: var(--light);
    font-size: 1.102rem;
    margin: 0;
    font-weight: 300;
}

/* PROJECT PREVIEW SECTION */
.project-preview-section {
    padding: 60px;
    position: relative;
    display: none;
    transition: opacity 0.4s ease;
    pointer-events: none;
    min-height: 100px;
    width:  1800px;
    left: -300px;    
}

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

.project-preview-section.visible {
    display: block;
    margin-top: -60px;
    pointer-events: auto;
    animation: slideInUp 0.6s ease-out;
}

.project-preview-section.visible + .dashboard-cards-section {
    margin-top: -70px !important;
}

.preview-container {
    background: transparent;
    border: none;
    border-radius: 18px;
    padding: 50px;
    backdrop-filter: none;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

.preview-header {
    text-align: center;
    margin-bottom: 20px;
}

.preview-header h3 {
    color: var(--light);
    font-size: 1.4rem;
    font-weight: 300;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.preview-header h3 i {
    color: var(--primary);
    font-size: 1.6rem;
}

.preview-subtitle {
    color: #bdbdbd;
    font-size: 1rem;
    margin: 0;
}

.preview-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 2fr));
    gap: 20px;
}

.preview-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: transparent;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.preview-stat-item:hover {
    background: transparent;
    border-color: transparent;
    transform: translateY(-3px);
}

.preview-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.preview-stat-icon.critical {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

.preview-stat-icon.success {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

.preview-stat-icon.info {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info);
}

.preview-stat-icon.warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning);
}

.preview-stat-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-stat-label {
    color: #bdbdbd;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.preview-stat-value {
    color: var(--light);
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
}

.preview-risks-detail {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.preview-risks-detail h4 {
    color: var(--light);
    font-size: 1.1rem;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-risks-detail h4 i {
    color: var(--primary);
}

.risk-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.risk-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border-left: 3px solid;
    text-align: center;
}

.risk-item.critical {
    border-color: var(--danger);
}

.risk-item.high {
    border-color: var(--warning);
}

.risk-item.medium {
    border-color: #ff9800;
}

.risk-label {
    color: #bdbdbd;
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
}

.risk-value {
    color: var(--light);
    font-size: 1.8rem;
    font-weight: 400;
}

.risk-item.critical .risk-value {
    color: var(--danger);
}

.risk-item.high .risk-value {
    color: var(--warning);
}

.risk-item.medium .risk-value {
    color: #ff9800;
}

.btn-view-full-dashboard {
    padding: 14px 28px;
    background: rgba(0, 0, 255, 0);
    color: white;
    border: 2px solid #0077ff;   /* <-- Blue border */
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.7);
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.4px;
    align-self: flex-start;
}

/* Optional glow on hover */
.btn-view-full-dashboard:hover {
    box-shadow: 0 0 12px #0099ff, 0 0 20px #00ccff;
    transform: translateY(-2px);
    animation: live-glow 1.5s infinite alternate;
}


.btn-view-full-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 110, 255, 0.3);
}

.btn-view-full-dashboard:active {
    transform: translateY(0);
}

.risk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.risk-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.risk-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

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

.projects-grid .project-card {
    animation: slideInProject 0.6s ease-out backwards;
}

.projects-grid .project-card:nth-child(1) { animation-delay: 0.1s; }
.projects-grid .project-card:nth-child(2) { animation-delay: 0.2s; }
.projects-grid .project-card:nth-child(3) { animation-delay: 0.3s; }
.projects-grid .project-card:nth-child(4) { animation-delay: 0.4s; }
.projects-grid .project-card:nth-child(5) { animation-delay: 0.5s; }
.projects-grid .project-card:nth-child(6) { animation-delay: 0.6s; }

.risk-dot.critical {
    background: var(--danger);
}

.risk-dot.high {
    background: var(--warning);
}

.risk-dot.medium {
    background: #ff9800;
}

/* DASHBOARD VIEW */
.dashboard-view {
    padding: 40px;
}

.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-back {
    padding: 8px 16px;
    background: rgba(0, 110, 255, 0.2);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    background: var(--primary);
    color: white;
}

.dashboard-title h2 {
    color: var(--light);
    font-size: 2rem;
    flex: 1;
    min-width: 250px;
}

.project-status {
    padding: 8px 16px;
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
    border-radius: 20px;
    font-weight: 400;
    font-size: 0.9rem;
}

/* STATS GRID */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-card.danger {
    border-color: rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.05);
}

.stat-card.warning {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.05);
}

.stat-card.success {
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.05);
}

.stat-card.info {
    border-color: rgba(23, 162, 184, 0.3);
    background: rgba(23, 162, 184, 0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-card.danger .stat-icon {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

.stat-card.warning .stat-icon {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning);
}

.stat-card.success .stat-icon {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

.stat-card.info .stat-icon {
    background: rgba(23, 162, 184, 0.2);
    color: var(--info);
}

.stat-content h3 {
    color: var(--light);
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.stat-content p {
    color: #bdbdbd;
    font-size: 0.9rem;
}

/* CHARTS SECTION */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 110, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.chart-card h3 {
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3 i {
    color: var(--primary);
}

.chart-container {
    position: relative;
    height: 300px;
}

.chart-card.full-width .chart-container {
    height: 250px;
}

/* MONITORING SECTION */
.monitoring-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.monitor-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 110, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.monitor-card h3 {
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-card h3 i {
    color: var(--primary);
}

/* VULNERABILITIES */
.vulnerability-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vulnerability-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vulnerability-item.critical {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.08);
}

.vulnerability-item.high {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.08);
}

.vulnerability-item.medium {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.08);
}

.vuln-level {
    font-weight: 400;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.vulnerability-item.critical .vuln-level {
    color: var(--danger);
}

.vulnerability-item.high .vuln-level {
    color: var(--warning);
}

.vulnerability-item.medium .vuln-level {
    color: #ff9800;
}

.vulnerability-item p {
    color: var(--light);
    font-size: 0.95rem;
    margin: 5px 0 0 0;
}

.vulnerability-item small {
    color: #bdbdbd;
    font-size: 0.8rem;
}

/* ALERTS */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert-item.danger {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.08);
}

.alert-item.danger i {
    color: var(--danger);
}

.alert-item.warning {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.08);
}

.alert-item.warning i {
    color: var(--warning);
}

.alert-item.success {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.08);
}

.alert-item.success i {
    color: var(--success);
}

.alert-content p {
    color: var(--light);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.alert-content small {
    color: #bdbdbd;
    font-size: 0.8rem;
}

/* NETWORK STATUS */
.network-status {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-name {
    color: var(--light);
    font-weight: 400;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 400;
}

.status-badge.online {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

.status-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.status-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), var(--info));
    transition: width 0.3s ease;
}

.status-item small {
    color: #bdbdbd;
    font-size: 0.8rem;
}

/* COMPLIANCE STATUS */
.compliance-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compliance-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.compliance-item.compliant i {
    color: var(--success);
}

.compliance-item.non-compliant i {
    color: var(--danger);
}

.compliance-item p {
    color: var(--light);
    font-size: 0.95rem;
    margin: 0;
}

.compliance-item small {
    color: #bdbdbd;
    font-size: 0.8rem;
}

/* BACKUP STATUS */
.backup-status {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    flex-wrap: wrap;
    gap: 10px;
}

.backup-info p {
    color: var(--light);
    font-size: 0.95rem;
    margin: 0;
}

.backup-info small {
    color: #bdbdbd;
    font-size: 0.8rem;
}

.backup-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 400;
    white-space: nowrap;
}

.backup-status-badge.success {
    background: rgba(40, 167, 69, 0.2);
    color: var(--success);
}

/* DASHBOARD FOOTER */
.dashboard-footer {
    background: rgba(28, 28, 28, 0.95);
    border-top: 1px solid rgba(0, 110, 255, 0.2);
    margin-top: 60px;
}

.dashboard-footer .container {
    padding: 60px 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--light);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.footer-section p {
    color: #bdbdbd;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-section ul li a {
    color: #bdbdbd;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(0, 110, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdbdbd;
    font-size: 0.9rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .charts-section {
        grid-template-columns: 1fr;
    }

    .chart-card.full-width {
        grid-column: 1;
    }

    .monitoring-section {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    .projects-header h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
    }

    .portal-logo img {
        width: 100px;
    }

    .header-info h1 {
        font-size: 1.3rem;
    }

    .header-user {
        width: 100%;
        justify-content: space-between;
    }

    .projects-view {
        padding: 40px 20px;
    }

    .projects-header h2 {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-card {
        min-height: 320px;
    }

    .project-card-content {
        min-height: 320px;
    }

    .project-card-front,
    .project-card-back {
        min-height: 320px;
        padding: 24px;
    }

    .dashboard-view {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-title h2 {
        min-width: auto;
        font-size: 1.5rem;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .monitoring-section {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 40px 25px;
    }

    .login-logo {
        width: 100px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 769px) {
    .project-preview-section {
        perspective: 1000px;
    }

    .preview-container {
        transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        transform-style: preserve-3d;
    }

    .preview-container.flipped {
        transform: rotateY(180deg);
    }

    .preview-flip-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 12px;
        background: rgba(0, 110, 255, 0.15);
        border: 1px solid rgba(0, 110, 255, 0.3);
        border-radius: 8px;
        color: var(--primary);
        font-size: 0.9rem;
        font-weight: 400;
        cursor: pointer;
        margin-bottom: 20px;
        transition: all 0.3s ease;
    }

    .preview-flip-toggle:active {
        background: rgba(0, 110, 255, 0.25);
    }

    .preview-back-side {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(0, 110, 255, 0.12) 0%, rgba(30, 144, 255, 0.06) 100%);
        border: 1px solid rgba(0, 110, 255, 0.25);
        border-radius: 18px;
        padding: 40px;
        backface-visibility: hidden;
        display: flex;
        flex-direction: column;
        gap: 20px;
        transform: rotateY(180deg);
    }

    .preview-back-title {
        color: var(--light);
        font-size: 1.5rem;
        font-weight: 400;
        margin: 0;
        text-align: center;
    }

    .preview-back-description {
        color: #bdbdbd;
        font-size: 0.9rem;
        margin: 0;
        text-align: center;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 0 15px;
    }

    .portal-logo img {
        width: 80px;
    }

    .header-info h1 {
        font-size: 1.1rem;
    }

    .projects-header h2 {
        font-size: 1.5rem;
    }

    .projects-header p {
        font-size: 0.95rem;
    }

    .projects-view {
        padding: 30px 15px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        min-height: 280px;
        padding: 20px;
    }

    .project-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .project-title h3 {
        font-size: 1.1rem;
    }

    .project-type {
        font-size: 0.85rem;
    }

    .project-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-preview-section {
        padding: 20px;
    }

    .preview-container {
        padding: 20px;
    }

    .preview-stats-grid {
        grid-template-columns: 1fr;
    }

    .preview-stat-item {
        padding: 14px;
    }

    .preview-stat-value {
        font-size: 1.3rem;
    }

    .risk-breakdown {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .risk-item {
        padding: 12px 8px;
    }

    .risk-value {
        font-size: 1.5rem;
    }

    .btn-view-full-dashboard {
        width: 100%;
    }

    .dashboard-view {
        padding: 15px;
    }

    .dashboard-title {
        gap: 10px;
    }

    .dashboard-title h2 {
        font-size: 1.3rem;
    }

    .btn-back {
        width: 100%;
        justify-content: center;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .login-container {
        padding: 15px;
    }

    .login-box {
        padding: 30px 20px;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .chart-container {
        height: 250px;
    }

    .chart-card.full-width .chart-container {
        height: 200px;
    }
}
