/* Dashboard App Grid Styles */
:root {
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --msc-orange: #FF6B00;
    --gmail-read-bg: #f2f6fc;
    --gmail-unread-bg: #ffffff;
    --gmail-hover-bg: #e8f0fe;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 60px;
}

/* Slogan styling */
.slogan {
    font-family: var(--font-family);
    font-size: clamp(2.375rem, 1.4507rem + 3.9437vw, 5rem);
    font-weight: 700;
    color: #152335;
    margin-bottom: 1.5rem;
    position: relative;
    line-height: 1.2;
    text-align: left;
}

.login-title {
    font-size: clamp(1.375rem, 1.287rem + 0.3756vw, 1.625rem)!important;
    font-weight: 600!important;
}

/* Apply Poppins to all text elements */
body,
button,
input,
select,
textarea,
.app-title,
.app-description,
.dashboard-header h1,
.dashboard-header p {
    font-family: var(--font-family);
}

/* Font weight adjustments */
.app-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.app-description {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-header h1 {
    font-weight: 700;
    margin-bottom: 40px;
}

.dashboard-header p {
    font-size: 16px;
    font-weight: 400;
    color: #6c757d;
}

/* Remove the default underline */
.slogan::after {
    display: none;
}

/* Add relative positioning to the word "apps" */
.slogan .underline {
    position: relative;
    display: inline-block;
}

/* Add underline only to the word "apps" */
.slogan .underline::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #39a9ff;
    border-radius: 5px;
}

/* Remove the highlight underline */
.slogan .highlight::after {
    display: none;
}

.app-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    width: 100%;
    gap: 18px;
    align-items: center;
}

.app-content {
    display: flex;
    width: 100%;
    gap: 18px;
    align-items: center;
}

.app-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    height: 100%;
    position: relative;
    cursor: pointer;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

/* Disabled app card */
.app-card.disabled {
    opacity: 0.7;
    background-color: #f5f5f5 !important;
    cursor: not-allowed;
}

.app-card.disabled:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

/* Lock icon in top-right corner */
.lock-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    z-index: 2;
}

.grayscale {
    filter: grayscale(100%);
    opacity: 0.7;
}

.disabled-icon {
    opacity: 0.7;
    background-color: #eee !important;
}

.disabled-icon i {
    color: #999 !important;
}

.app-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: -1; /* Ensures icon is always on the left */
}

.app-info {
    flex: 1;
    min-width: 0; /* Prevents text overflow issues */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.placeholder-icon i {
    font-size: 28px;
    color: var(--primary-color);
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}

/* App card color variations - only for accessible apps */
.app-grid a:nth-child(6n+1) .app-card { background-color: #f0f7ff; }
.app-grid a:nth-child(6n+2) .app-card { background-color: #fff0f3; }
.app-grid a:nth-child(6n+3) .app-card { background-color: #f3f0ff; }
.app-grid a:nth-child(6n+4) .app-card { background-color: #ebfbee; }
.app-grid a:nth-child(6n+5) .app-card { background-color: #fff8e6; }
.app-grid a:nth-child(6n+6) .app-card { background-color: #f0f5f9; }

.app-grid a:nth-child(6n+1) .app-card:hover { background-color: #f8fbff; }
.app-grid a:nth-child(6n+2) .app-card:hover { background-color: #fff8f9; }
.app-grid a:nth-child(6n+3) .app-card:hover { background-color: #f9f6ff; }
.app-grid a:nth-child(6n+4) .app-card:hover { background-color: #f0fcf2; }
.app-grid a:nth-child(6n+5) .app-card:hover { background-color: #fffbf0; }
.app-grid a:nth-child(6n+6) .app-card:hover { background-color: #f5f9fc; }

/* Dashboard header */
.dashboard-header {
    margin: 60px 0;
    text-align: left;
}

/* Mobile-first responsive adjustments */
@media (max-width: 992px) {
    .dashboard-header {
        margin-bottom: 40px;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        margin-bottom: 50px;
    }
}

@media (max-width: 768px) {
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 16px;
        padding: 0 16px;
    }
    
    .app-card {
        padding: 16px;
    }
    
    .app-content,
    .app-link {
        gap: 12px;
    }
    
    .app-icon {
        width: 48px;
        height: 48px;
    }
    
    .app-info {
        padding-right: 24px; /* Space for lock icon */
    }
    
    .placeholder-icon {
        width: 50px;
        height: 50px;
    }
    
    .placeholder-icon i {
        font-size: 24px;
    }
    
    .app-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .app-description {
        font-size: 13px;
    }
    
    .slogan {
       margin-bottom: 1rem;
    }
    
    .slogan .underline::after {
        height: 4px;
        bottom: -3px;
    }
    
    .dashboard-header {
        margin-bottom: 30px;
    }
    
    .lock-icon {
        width: 24px;
        height: 24px;
        top: 8px;
        right: 8px;
        font-size: 10px;
    }
}

@media (max-width: 576px) {
    .app-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .app-card {
        padding: 12px;
    }
    
    .app-content,
    .app-link {
        gap: 10px;
    }
    
    .app-icon {
        width: 40px;
        height: 40px;
    }
    
    .placeholder-icon {
        width: 45px;
        height: 45px;
        border-radius: 8px;
    }
    
    .placeholder-icon i {
        font-size: 20px;
    }
    
    .app-title {
        font-size: 16px;
        font-weight: 600;
    }
    
    .app-description {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .slogan {
        line-height: 1.1;
        margin-bottom: 0.8rem;
    }
    
    .slogan .underline::after {
        height: 3px;
        bottom: -2px;
    }
    
    .dashboard-header {
        margin-bottom: 24px;
        padding: 0 20px;
    }
    
    .lock-icon {
        width: 20px;
        height: 20px;
        top: 6px;
        right: 6px;
        font-size: 9px;
    }
    
    /* Improve touch targets on mobile */
    .app-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Better scrolling on mobile */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent zoom on input focus */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .slogan {
        padding: 0 12px;
    }
    
    .app-grid {
        margin-bottom: 30px;
    }
    
    .app-card {
        padding: 14px;
        margin-bottom: 8px;
    }
    
    .app-icon {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .placeholder-icon {
        width: 40px;
        height: 40px;
    }
    
    .placeholder-icon i {
        font-size: 18px;
    }
    
    .app-title {
        font-size: 15px;
    }
    
    .app-description {
        font-size: 11px;
    }
    
    .dashboard-header {
        padding: 0 16px;
        margin-bottom: 20px;
    }
    
    /* Extremely small screens */
    .empty-state {
        padding: 20px 12px;
    }
    
    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .slogan {
        margin-bottom: 0.5rem;
    }
    
    .dashboard-header {
        margin-bottom: 20px;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 12px;
    }
    
    .app-card {
        padding: 12px;
        min-height: 70px;
    }
}

/* High DPI display adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .placeholder-icon i {
        transform: translateZ(0); /* Better rendering on retina */
    }
    
    .app-card {
        box-shadow: 0 2px 3px rgba(0, 0, 0, 0.08);
    }
    
    .app-card:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
    }
}

/* Gmail Interface Styles */
/* Email list styling */
.email-list {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

/* Important background colors */
tr.email-item.unread {
    background: #fff !important;
    font-weight: 600;
}
tr.email-item:not(.unread) {
    background: #f2f6fc !important;
    font-weight: 400;
}
tr.email-item:hover {
    background: #e8f0fe !important;
}
tr.email-item .sender-name,
tr.email-item .subject-text {
    color: #202124;
}

/* Email item styling */
.email-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.email-item:hover {
    background-color: var(--gmail-hover-bg) !important;
}

/* Email components */
.email-checkbox {
    width: 40px;
    padding-left: 16px !important;
}

.email-sender, .email-recipient {
    width: 220px;
}

.email-date {
    width: 100px;
    text-align: right;
    padding-right: 16px !important;
}

.snippet {
    color: #5f6368;
    font-weight: 400;
}

/* Gmail toolbar */
.gmail-toolbar {
    padding: 8px 16px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Badge styling */
.badge-sm {
    font-size: 0.7em;
    padding: 0.25em 0.5em;
}

/* Empty state */
.gmail-empty-state {
    padding: 4rem 2rem !important;
    text-align: center;
}

/* Password Input Toggle Styles */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input[type="password"],
.password-input-group input[type="text"] {
    padding-right: 45px;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: color 0.2s ease;
    height: 36px;
    width: 36px;
}

.password-toggle-btn:hover {
    color: #FF6B00;
}

.password-toggle-btn:focus {
    outline: 2px solid #FF6B00;
    outline-offset: 2px;
    border-radius: 4px;
}

.password-toggle-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.password-toggle-btn .eye-icon,
.password-toggle-btn .eye-off-icon {
    stroke-linecap: round;
    stroke-linejoin: round;
} 