/* MeKey Branding */
.navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* Custom MeKey Colors */
.btn.btn-primary.btn-sm.btn-block,
.btn.btn-primary {
    background-color: #1E56FF;
    border-color: #1E56FF;
}

.btn.btn-primary:hover {
    background-color: #0d47e6;
    border-color: #0d47e6;
}

/* Hide social logins on login page */
#page-login>div>main>div.page_content>div>section.for-login>div.login-content.page-card>form>div>div.social-logins.text-center {
    display: none;
}

/* Custom page title for MeKey */
.page-title .title-text::before {
    content: "MeKey - ";
    color: #1E56FF;
    font-weight: bold;
}

/* Creator Profile Setup Banner */
.creator-profile-banner {
    background: linear-gradient(135deg, #1E56FF, #667eea);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px;
    text-align: center;
}

.creator-profile-banner h4 {
    margin: 0 0 10px 0;
}

.creator-profile-banner .btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    margin-top: 10px;
}

.creator-profile-banner .btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Asset Protection Dashboard Card */
.asset-protection-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.asset-protection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.asset-protection-card h3 {
    margin-bottom: 15px;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.asset-protection-card p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.5;
}

.asset-protection-card .features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.asset-protection-card .feature {
    background: rgba(255,255,255,0.1);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.asset-protection-card .cta-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 12px 24px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.asset-protection-card .cta-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ============================================
   MeKey Project Actions Sidebar
   ============================================ */

/* Main layout with sidebar */
.mekey-form-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    min-height: calc(100vh - 200px);
}

.mekey-form-with-sidebar.sidebar-collapsed {
    grid-template-columns: 1fr 60px;
}

.mekey-form-main {
    overflow: auto;
}

/* Actions Sidebar */
.mekey-actions-sidebar {
    background: #f4f5f6;
    border-left: 1px solid #d1d8dd;
    padding: 20px;
    position: sticky;
    top: 0;
    height: fit-content;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    transition: width 0.3s ease, padding 0.3s ease;
}

.mekey-actions-sidebar.collapsed {
    padding: 15px 10px;
}

/* Sidebar Toggle Button */
.mekey-sidebar-toggle {
    width: 100%;
    padding: 8px 12px;
    background: white;
    border: 1px solid #d1d8dd;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #6c7680;
    transition: all 0.2s;
}

.mekey-sidebar-toggle:hover {
    background: #936CE8;
    color: white;
    border-color: #936CE8;
}

.mekey-sidebar-toggle .toggle-icon {
    transition: transform 0.3s;
    font-size: 10px;
}

.mekey-actions-sidebar.collapsed .mekey-sidebar-toggle {
    padding: 10px;
}

.mekey-actions-sidebar.collapsed .mekey-sidebar-toggle .toggle-icon {
    transform: rotate(180deg);
}

.mekey-actions-sidebar.collapsed .mekey-sidebar-toggle .toggle-text {
    display: none;
}

/* Sidebar Title */
.mekey-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    color: #6c7680;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.mekey-actions-sidebar.collapsed .mekey-sidebar-title {
    display: none;
}

/* Action Groups */
.mekey-action-group {
    margin-bottom: 20px;
}

.mekey-actions-sidebar.collapsed .mekey-action-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.mekey-action-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #1f272e;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mekey-actions-sidebar.collapsed .mekey-action-group-title {
    display: none;
}

.mekey-action-group-title .group-icon {
    width: 20px;
    height: 20px;
    background: #936CE8;
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.mekey-action-group-title .group-icon.agent {
    background: #FF4800;
}

.mekey-action-group-title .group-icon.asset {
    background: #759283;
}

.mekey-action-group-title .group-icon.info {
    background: #9BEFE0;
    color: #070707;
}

/* Action Buttons */
.mekey-action-btn {
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    background: white;
    border: 1px solid #d1d8dd;
    border-radius: 6px;
    font-size: 13px;
    color: #1f272e;
    cursor: pointer;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.mekey-action-btn:hover {
    border-color: #936CE8;
    background: white;
    transform: translateX(3px);
}

.mekey-action-btn:active {
    transform: translateX(1px);
}

.mekey-action-btn.primary {
    background: #936CE8;
    color: white;
    border-color: #936CE8;
}

.mekey-action-btn.primary:hover {
    background: #7d5ad0;
    border-color: #7d5ad0;
}

.mekey-action-btn .btn-icon {
    width: 24px;
    height: 24px;
    background: #f4f5f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.mekey-action-btn.primary .btn-icon {
    background: rgba(255,255,255,0.2);
}

.mekey-action-btn .btn-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Collapsed state for action buttons */
.mekey-actions-sidebar.collapsed .mekey-action-btn {
    padding: 10px;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
}

.mekey-actions-sidebar.collapsed .mekey-action-btn .btn-text {
    display: none;
}

.mekey-actions-sidebar.collapsed .mekey-action-btn .btn-icon {
    margin: 0;
    width: 20px;
    height: 20px;
    font-size: 11px;
    background: transparent;
}

.mekey-actions-sidebar.collapsed .mekey-action-btn.primary .btn-icon {
    background: transparent;
}

/* Sidebar Stats (mini stats at bottom) */
.mekey-sidebar-stats {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #d1d8dd;
}

.mekey-actions-sidebar.collapsed .mekey-sidebar-stats {
    display: none;
}

.mekey-sidebar-stats-title {
    font-size: 11px;
    color: #6c7680;
    margin-bottom: 10px;
}

.mekey-sidebar-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mekey-stat-mini {
    background: white;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #d1d8dd;
}

.mekey-stat-mini .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #936CE8;
}

.mekey-stat-mini .stat-value.success {
    color: #36a94c;
}

.mekey-stat-mini .stat-value.warning {
    color: #f0ad4e;
}

.mekey-stat-mini .stat-label {
    font-size: 10px;
    color: #6c7680;
    margin-top: 2px;
}

/* Quick Stats Row (top of Overview tab) */
.mekey-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 0 15px;
}

.mekey-quick-stat {
    background: #f4f5f6;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.mekey-quick-stat .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #936CE8;
}

.mekey-quick-stat .stat-label {
    font-size: 12px;
    color: #6c7680;
    margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .mekey-form-with-sidebar {
        grid-template-columns: 1fr 240px;
    }
    
    .mekey-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mekey-form-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .mekey-actions-sidebar {
        position: fixed;
        right: 0;
        top: 60px;
        width: 280px;
        height: calc(100vh - 60px);
        max-height: none;
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .mekey-actions-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .mekey-actions-sidebar.collapsed {
        width: 60px;
        transform: translateX(0);
    }
}

/* Submissions grid - keep Add Row visible for manual entry */

/* Hide Reload and Apps from user dropdown menu - show only Log out */
.navbar .dropdown-menu a[href="/app/apps"],
.navbar .dropdown-menu a[onclick*="reload"],
.navbar .dropdown-menu .dropdown-item:has(span:contains("Reload")),
.navbar .dropdown-menu .dropdown-item:has(span:contains("Apps")),
#navbar-user .dropdown-menu a[data-action="reload"],
.dropdown-menu a.grey-link[onclick*="location.reload"],
.standard-sidebar-section .sidebar-menu a[href="/app/apps"] {
    display: none !important;
}

/* Alternative selectors for Frappe's menu items */
.dropdown-menu .dropdown-item[onclick*="reload"],
.dropdown-menu .dropdown-item[href="/app/apps"],
.navbar-nav .dropdown-menu li:has(a[onclick*="reload"]),
.navbar-nav .dropdown-menu li:has(a[href*="/app/apps"]) {
    display: none !important;
}
