/* Frontend Styles for Domain Brokerage Manager - Modern UI */

/* Base Styles */
.dbm-dashboard {
    font-family: 'Poppins', sans-serif;
    color: #2d3748;
    max-width: 1400px;
    margin: 0 auto;
    background: #f7fafc;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 5px 10px rgba(0, 0, 0, 0.03);
}

.dbm-dashboard * {
    box-sizing: border-box;
}

.dbm-dashboard a {
    color: #3182ce;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dbm-dashboard a:hover {
    color: #2c5282;
    text-decoration: none !important;
}

.dbm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #4299e1;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none !important;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.2);
    position: relative;
    overflow: hidden;
}

.dbm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(66, 153, 225, 0.3);
    background: #3182ce;
    color: #fff !important;
    text-decoration: none !important;
}

.dbm-button-secondary {
    background: #edf2f7;
    color: #4a5568 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.dbm-button-secondary:hover {
    background: #e2e8f0;
    color: #2d3748 !important;
}

.dbm-button-small {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
}

/* Layout */
.dbm-container {
    display: flex;
    min-height: 90vh;
}

.dbm-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #3182ce 0%, #2c5282 100%);
    color: #fff;
    padding: 30px 0;
    position: relative;
    transition: all 0.3s ease;
    z-index: 10;
}

.dbm-content {
    flex: 1;
    padding: 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.dbm-content-inner {
    padding: 30px;
}

/* Header */
.dbm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    position: relative;
}

.dbm-greeting {
    font-size: 22px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.dbm-today {
    font-size: 14px;
    color: #718096;
    font-weight: 400;
}

.dbm-user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dbm-profile-pic {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dbm-logout {
    padding: 8px 16px;
    border-radius: 50px;
    background: #f7fafc;
    color: #4a5568;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dbm-logout:hover {
    background: #edf2f7;
    transform: translateY(-1px);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.05);
}

/* Sidebar */
.dbm-logo {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 25px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dbm-logo img {
    width: 120px;
    height: auto;
    max-width: 60%;
}

.dbm-user-info {
    padding: 0 25px;
    margin-bottom: 35px;
    text-align: center;
}

.dbm-user-info .dbm-profile-pic {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    display: block;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.dbm-user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #fff;
}

.dbm-user-role {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.dbm-nav {
    list-style: none;
    padding: 0 15px;
    margin: 0;
}

.dbm-nav-item {
    margin-bottom: 8px;
}

.dbm-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease;
    font-weight: 500;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.dbm-nav-link:hover,
.dbm-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    text-decoration: none;
    transform: translateX(3px);
}

.dbm-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dbm-nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
    opacity: 0.9;
}

.dbm-support {
    margin-top: 40px;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    margin-left: 15px;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dbm-support-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.dbm-support-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.6;
}

.dbm-support-info a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 8px;
}

.dbm-support-info a:hover {
    color: #fff !important;
    text-decoration: none;
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.08);
}

.dbm-support-info i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
    font-size: 14px;
}

/* Dashboard Widgets */
.dbm-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

.dbm-widget {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #edf2f7;
}

.dbm-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.dbm-widget:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #4299e1;
    opacity: 0.8;
}

.dbm-widget:nth-child(2):after {
    background: #38b2ac;
}

.dbm-widget:nth-child(3):after {
    background: #9f7aea;
}

.dbm-widget:nth-child(4):after {
    background: #48bb78;
}

.dbm-widget-title {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
    font-weight: 500;
}

.dbm-widget-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #2d3748;
}

.dbm-widget-subtitle {
    font-size: 13px;
    color: #718096;
    font-weight: 400;
}

/* Welcome Section */
.dbm-welcome {
    background: linear-gradient(135deg, #4299e1 0%, #2b6cb0 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 35px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(66, 153, 225, 0.15);
    position: relative;
    overflow: hidden;
}

.dbm-welcome-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.dbm-welcome-text {
    font-size: 14px;
    opacity: 0.9;
}

/* Tables */
.dbm-table-container {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    border: 1px solid #edf2f7;
    position: relative;
    overflow: hidden;
}

.dbm-table-container:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #4299e1;
    opacity: 0.8;
}

.dbm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.dbm-table th,
.dbm-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

.dbm-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    position: sticky;
    top: 0;
    z-index: 5;
}

.dbm-table tbody tr {
    transition: all 0.3s ease;
}

.dbm-table tbody tr:hover {
    background: #f8fafc;
}

.dbm-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status badges */
.dbm-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.dbm-status-active {
    background: #e6fffa;
    color: #2c7a7b;
}

.dbm-status-initiated {
    background: #fefcbf;
    color: #b7791f;
}

.dbm-status-stalled {
    background: #fed7d7;
    color: #c53030;
}

.dbm-status-closed {
    background: #e9d8fd;
    color: #6b46c1;
}

.dbm-status-sold {
    background: #dcfce7;
    color: #166534;
}

/* Section titles */
.dbm-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
}

/* Activity Log */
.dbm-activity-log {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 35px;
    border: 1px solid #edf2f7;
    position: relative;
    overflow: hidden;
}

.dbm-activity-items {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

.dbm-activity-item {
    display: flex;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    border: 1px solid #f0f5fa;
}

.dbm-activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.03);
}

.dbm-activity-text {
    font-size: 14px;
    color: #2d3748;
}

.dbm-activity-date {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

/* Lead Pipeline */
.dbm-pipeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.dbm-pipeline-column {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
}

.dbm-pipeline-header {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dbm-pipeline-header.initiated {
    color: #d69e2e;
}

.dbm-pipeline-header.active {
    color: #2c7a7b;
}

.dbm-pipeline-header.stalled {
    color: #c53030;
}

.dbm-pipeline-header.closed {
    color: #6b46c1;
}

.dbm-lead-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s ease;
}

.dbm-lead-card:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.dbm-lead-domain {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.dbm-lead-prospect {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
}

.dbm-lead-amount {
    font-size: 14px;
    font-weight: 600;
    color: #38b2ac;
}

/* Empty states */
.dbm-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.dbm-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.dbm-empty-state h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

/* Loading */
.dbm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    width: 100%;
}

.dbm-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(66, 153, 225, 0.1);
    border-left-color: #4299e1;
    border-radius: 50%;
    animation: dbm-spin 1s linear infinite;
}

@keyframes dbm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.dbm-error-message {
    padding: 20px;
    background: #fed7d7;
    color: #c53030;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    border: 1px solid #feb2b2;
}

/* Login Required */
.dbm-login-required {
    padding: 35px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 500px;
    margin: 50px auto;
    border: 1px solid #edf2f7;
}

.dbm-login-required p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #2d3748;
}

/* Mobile Menu Toggle */
.dbm-mobile-menu-toggle {
    display: none;
    background: #f7fafc;
    color: #3182ce;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
}

.dbm-mobile-menu-toggle:hover {
    background: #edf2f7;
    color: #2c5282;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .dbm-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dbm-pipeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .dbm-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dbm-pipeline {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dbm-container {
        flex-direction: column;
    }
    
    .dbm-sidebar {
        width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 20px;
        display: none;
        margin-bottom: 15px;
    }
    
    .dbm-sidebar.active {
        display: block;
    }
    
    .dbm-mobile-menu-toggle {
        display: flex;
    }
    
    .dbm-content-inner {
        padding: 20px;
    }
    
    .dbm-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dbm-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dbm-user-controls {
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }
    
    .dbm-table-container {
        padding: 15px;
        overflow-x: auto;
    }
    
    .dbm-table {
        min-width: 600px;
    }
    
    .dbm-pipeline {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .dbm-dashboard {
        padding: 0;
        border-radius: 0;
    }
    
    .dbm-content-inner {
        padding: 15px;
    }
    
    .dbm-activity-item {
        flex-direction: column;
    }
    
    .dbm-activity-date {
        margin-top: 8px;
    }
    
    .dbm-table {
        min-width: 100%;
    }
}