/* Custom Styles for Modern PME Portal - Subtle Theme */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary-color: #3b82f6;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --font-family: 'Outfit', sans-serif;
    --radius-lg: 16px;
    --radius-md: 12px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body.auth-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Very subtle background ambient decoration */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

body::before {
    background: #93c5fd;
    top: 5%;
    left: 10%;
    animation: float-slow 20s infinite alternate;
}

body::after {
    background: #c7d2fe;
    bottom: 5%;
    right: 10%;
    animation: float-slow 20s infinite alternate-reverse;
}

@keyframes float-slow {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(20px) scale(1.05); }
}

/* Container & Card styling */
.container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    perspective: 1000px;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 40px 30px;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 25px 35px -5px rgba(59, 130, 246, 0.08), 0 15px 15px -5px rgba(0, 0, 0, 0.02);
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

/* Form inputs & controls */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 13px 15px 13px 45px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: #a1a1aa;
}

.form-input:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-input:focus + .input-icon {
    color: var(--primary-color);
}

/* Checkbox & Links */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label {
    color: var(--text-secondary);
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
    opacity: 0.95;
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
    color: var(--text-primary);
}

/* Footer / Switch Screen link */
.card-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.card-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.card-footer a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.4;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.15);
    color: #065f46;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.15);
    color: #92400e;
}

.alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* Dashboard & Full-width Container Styling */
.dashboard-container {
    width: 100%;
    max-width: 1550px;
    margin: 0 auto;
    padding: 24px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.dashboard-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-small {
    width: 38px;
    height: 38px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-body {
    padding: 40px;
}

.welcome-section {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.welcome-desc {
    color: var(--text-secondary);
    font-size: 16px;
}

.user-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.profile-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.03);
}

.profile-card-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-card-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.logout-btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.logout-btn-nav:hover {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Animations and transitions */
.page-transition {
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.98) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }
    
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .dashboard-body {
        padding: 20px;
    }
}
