/* HAWKiTECH Client Portal - Netflix-Style Theme */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;
    --gold: #f59e0b;
    --gold-light: #fbbf24;
    --gold-dark: #d97706;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border-color: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --error: #ef4444;
    --info: #3b82f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at top left, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Login Page Styles */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 4rem;
}

.login-box {
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-text .gold {
    color: var(--gold);
}

.gold {
    color: var(--gold);
}

.logo-subtitle {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkmark {
    background: var(--gold);
    border-color: var(--gold);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: black;
    font-size: 0.75rem;
    font-weight: 700;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--gold-light);
}

.btn-login {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: black;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.arrow-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.sso-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.sso-divider::before,
.sso-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.sso-divider span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sso-buttons {
    display: flex;
    gap: 1rem;
}

.btn-sso {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-sso:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gold);
}

.btn-sso svg {
    width: 1.25rem;
    height: 1.25rem;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--gold);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Service Preview on Login */
.service-preview {
    display: none;
}

@media (min-width: 1024px) {
    .service-preview {
        display: block;
    }

    .service-preview h3 {
        font-size: 1.25rem;
        color: var(--text-secondary);
        margin-bottom: 1.5rem;
    }

    .preview-cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .preview-card {
        background: rgba(20, 20, 20, 0.6);
        border: 1px solid var(--border-color);
        border-radius: 1rem;
        padding: 1.5rem;
        text-align: center;
        transition: all 0.3s ease;
    }

    .preview-card:hover {
        transform: translateY(-4px);
        border-color: var(--gold);
        box-shadow: 0 10px 30px rgba(245, 158, 11, 0.1);
    }

    .card-icon {
        width: 3rem;
        height: 3rem;
        border-radius: 0.75rem;
        margin: 0 auto 1rem;
    }

    .card-icon.infrastructure {
        background: linear-gradient(135deg, #13b4ff 0%, #0080c0 100%);
    }

    .card-icon.monitoring {
        background: linear-gradient(135deg, #5cdd8b 0%, #3aaf61 100%);
    }

    .card-icon.security {
        background: linear-gradient(135deg, #4fd1c5 0%, #319795 100%);
    }

    .card-icon.tools {
        background: linear-gradient(135deg, #805ad5 0%, #553c9a 100%);
    }

    .preview-card span {
        font-size: 0.875rem;
        color: var(--text-secondary);
    }
}

/* Dashboard Styles */
.dashboard-body {
    padding-top: 4rem;
}

.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--success);
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background: var(--gold);
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* Main Dashboard Content */
.dashboard-main {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.welcome-section {
    margin-bottom: 3rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Service Categories */
.services-section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.service-category {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.category-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.category-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
}

.infrastructure-icon {
    background: linear-gradient(135deg, #13b4ff 0%, #0080c0 100%);
}

.monitoring-icon {
    background: linear-gradient(135deg, #5cdd8b 0%, #3aaf61 100%);
}

.tools-icon {
    background: linear-gradient(135deg, #805ad5 0%, #553c9a 100%);
}

.security-icon {
    background: linear-gradient(135deg, #4fd1c5 0%, #319795 100%);
}

.apps-icon {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
}

.category-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Service Cards - Netflix Style */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gold);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(245, 158, 11, 0.1);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .card-glow {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.service-icon svg {
    width: 1.75rem;
    height: 1.75rem;
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold);
    transition: gap 0.2s ease;
}

.service-card:hover .launch-btn {
    gap: 0.625rem;
}

.launch-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-value.good {
    color: var(--success);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Footer */
.dashboard-footer {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 4rem auto 0;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-footer p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }

    .login-box {
        padding: 2rem;
    }

    .top-nav {
        padding: 0 1rem;
    }

    .status-indicator {
        display: none;
    }

    .user-name {
        display: none;
    }

    .dashboard-main {
        padding: 1rem;
    }

    .welcome-section h1 {
        font-size: 1.75rem;
    }

    .dashboard-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--gold);
    color: black;
    padding: 0.5rem 1rem;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0 0 0.5rem 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Callback Page Styles */
.callback-box {
    text-align: center;
}

.callback-status {
    margin: 2rem 0;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.callback-message {
    color: var(--text-secondary);
    margin-top: 1rem;
}

.callback-error {
    color: var(--error);
    margin: 2rem 0;
}

.callback-error p {
    margin-bottom: 1rem;
}

.callback-return-btn {
    display: inline-flex;
    margin-top: 1rem;
}

/* Focus States for Accessibility */
.service-card:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.service-card:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .service-card {
        border-width: 2px;
    }

    .btn-login,
    .btn-sso {
        border: 2px solid currentColor;
    }
}

/* Error Pages */
.error-box {
    text-align: center;
}

.error-content {
    margin: 2rem 0;
}

.error-code {
    font-size: 5rem;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-code.warning {
    color: var(--gold);
}

.error-code.error {
    color: var(--error);
}

.error-content h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Form Validation States */
.form-group input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.valid {
    border-color: var(--success);
}

.form-error {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.visible {
    display: block;
}

/* Loading States */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-login.loading::after {
    content: '';
    width: 1rem;
    height: 1rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
