/* Base styles */
body {
    /*background-color: #efefef;*/
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}



/* Main container styles */
.main-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 50px 20px;
    flex: 1;
    min-width: 50%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dashboard-header h1 {
    color: #1f1c17;
    font-size: 28px;
    margin: 0;
}

.dashboard-header img {
   
    margin: 0;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.view-btn.active {
    background-color: #1f1c17; /* Updated color for active button */
    color: white;
    border-color: #333;
}

.view-btn:hover:not(.active) {
    background-color: #e0e0e0;
}

.view-icon {
    font-size: 16px;
}

/* Search box styles */
.search-container {
    margin-bottom: 20px;
    width: 100%;
}

.search-box {
    position: relative;
    width: -webkit-fill-available;
}

.search-box input {
    padding: 12px 15px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: -webkit-fill-available;
}

.search-box input:focus {
    border-color: #1f1c17;
    box-shadow: 0 0 0 2px rgba(31, 28, 23, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
    font-family: Arial, sans-serif;
}

.search-icon img {
    width: 18px;
}

/* Application container styles */
.apps-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* List view header styles */
.list-header {
    display: grid;
    grid-template-columns: 80px 2fr 3fr 2fr;
    background-color: #f5f5f5;
    border-radius: 10px 10px 0 0;
    padding: 12px 15px;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #ddd;
    margin-bottom: 5px;
    /*width: 100%;*/
}

.list-header-cell {
    padding: 0 10px;
}

/* List view styles */
.apps-container.list-view .app-item {
    display: grid;
    grid-template-columns: 80px 2fr 3fr 2fr;
    background-color: white;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 1px solid #eee;
    align-items: center;
    margin-bottom: 3px;
    /*width: 100%;*/
}

.apps-container.list-view .app-item:last-child {
    border-radius: 0 0 10px 10px;
}

.apps-container.list-view .app-item:hover {
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.apps-container.list-view .app-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
    background-color: #f5f5f5;
    padding: 5px;
    justify-self: center;
    cursor: pointer;
}

.apps-container.list-view .app-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
}

.apps-container.list-view .app-name {
    font-weight: bold;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.apps-container.list-view .app-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.apps-container.list-view .app-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

/* Grid view styles */
.apps-container.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
}

@media (max-width: 1013px) {
    .apps-container.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .apps-container.grid-view {
        grid-template-columns: repeat(1, 1fr);
    }
}

.apps-container.grid-view .app-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.apps-container.grid-view .app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.apps-container.grid-view .app-logo {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 15px;
    object-fit: contain;
    background-color: #f5f5f5;
    padding: 10px;
    cursor: pointer;
}

.apps-container.grid-view .app-info {
    width: 100%;
}

.apps-container.grid-view .app-name {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.apps-container.grid-view .app-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.apps-container.grid-view .app-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

/* Common app item styles */
.new-badge {
    background-color: #E30613; /* Red color for new badge */
    color: white;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
    font-weight: normal;
}

.app-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.app-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-visibility-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #bfd1dc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-visibility-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-visibility-slider {
    background-color: #73bae3; /* Updated color for active toggle */
}

input:checked + .toggle-visibility-slider:before {
    transform: translateX(26px);
}


input:checked + .toggle-slider {
    background-color: #1f1c17; /* Updated color for active toggle */
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.force-logout-btn, .go-to-app-btn {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 13px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 44px;
    min-width: 44px;
}

.force-logout-btn:hover, .go-to-app-btn:hover {
    background-color: #e0e0e0;
}





/* Tooltip for full description */
.app-description {
    position: relative;
}

.app-description .full-description {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    line-height: 1.4;
}

.app-description:hover .full-description {
    visibility: visible;
    opacity: 1;
}

.hidden{
    display: none;
}

/*!* Footer styles *!*/
/*footer {*/
/*    margin-top: auto;*/
/*    text-align: center;*/
/*    padding: 25px;*/
/*    color: #666;*/
/*    font-size: 14px;*/
/*    background-color: #f0f0f0;*/
/*    height: 80px;*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*}*/

/*footer p {*/
/*    margin: 5px 0;*/
/*}*/

/* No results message */
.no-results {
    text-align: center;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 20px 0;
}

.no-results p {
    color: #666;
    font-size: 16px;
    margin-bottom: 15px;
}

.no-results button {
    background-color: #1f1c17;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.no-results button:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.pp-login-methods
{
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    position: absolute;
    left: 10px;
    opacity: 0.5;
}

/* Animations */
@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

/* Responsive design */
@media (max-width: 900px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .view-toggle {
        width: 100%;
    }

    .view-btn {
        flex: 1;
        justify-content: center;
    }

    .apps-container {
        grid-template-columns: 1fr;
    }

    .apps-container.list-view .app-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .apps-container.list-view .app-logo {
        margin-bottom: 15px;
        margin-right: 0;
        cursor: pointer;
    }

    .apps-container.list-view .app-actions {
        margin-top: 15px;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }

    .app-actions button {
        flex: 1;
        min-width: 44px;
        max-width: 44px;
        justify-content: center;
    }

    /*!* Hide home link on mobile *!*/
    /*.home-link {*/
    /*    display: none;*/
    /*}*/

    header {
        justify-content: space-between;
    }

    header .logo-container {
        margin-left: 0;
    }

    /* Responsive user profile */
    .user-profile {
        margin-right: 20px;
    }

    .user-dropdown {
        right: -10px;
    }
}

@media (max-width: 600px) {
    .main-container {
        margin: 15px auto;
        padding: 0 15px;
    }

    .dashboard-header h1 {
        font-size: 22px;
    }

    footer {
        padding: 20px;
        height: auto;
    }

    /*header .logo-container img {*/
    /*    height: 25px;*/
    /*}*/

    .app-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .app-actions button, .app-toggle {
        margin-bottom: 5px;
    }
}
