/* CIIE Management System - Master Public Stylesheet */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* Global Reset & Scoping */
.ciie-frontend-wrapper *, .ciie-portal-wrapper *, .ciie-auth-wrapper *, .ciie-saas-master-container * {
    box-sizing: border-box;
}

/* Master SaaS Container (Customer Dashboard & Portals) */
.ciie-saas-master-container {
    display: flex;
    height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f9fafb;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    text-align: left;
}

/* Sidebar Styling */
.ciie-saas-sidebar {
    width: 260px;
    background: #082365;
    color: #f9fafb;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
}

.ciie-brand {
    padding: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ciie-brand img {
    max-height: 38px;
    width: auto;
    display: block;
}

.ciie-brand span {
    color: #FA752A;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.ciie-nav-section {
    padding: 20px 25px 10px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ciie-saas-nav {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-grow: 1;
    padding-bottom: 20px;
}

.ciie-saas-nav a {
    padding: 12px 25px;
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.ciie-saas-nav a .dashicons {
    margin-right: 12px;
    font-size: 18px;
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.ciie-saas-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.ciie-saas-nav a.active {
    background: rgba(250, 117, 42, 0.1);
    color: #fff;
    border-left-color: #FA752A;
}

.ciie-saas-nav a.active .dashicons {
    color: #FA752A;
    opacity: 1;
}

.ciie-logout-link {
    margin-top: auto;
    color: #FA752A !important;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Main Content Wrapper */
.ciie-saas-main {
    flex-grow: 1;
    background: #f9fafb;
    overflow-y: auto;
    padding: 40px;
}

.ciie-saas-content-area {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Cards & Widgets */
.ciie-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.ciie-widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ciie-widget-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ciie-widget-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ciie-widget-data h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.ciie-widget-data span {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* Data Tables */
.wp-list-table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
}

.wp-list-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    margin: 0;
    border: none;
}

.wp-list-table th, .wp-list-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    vertical-align: middle;
}

.wp-list-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.wp-list-table tbody tr:hover {
    background: #f9fafb;
}

/* Buttons */
.button, .ciie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.button-primary, .ciie-btn-primary {
    background: #FA752A !important;
    color: #fff !important;
    border-color: #E0611D !important;
    box-shadow: 0 4px 6px -1px rgba(250, 117, 42, 0.2);
}

.button-primary:hover, .ciie-btn-primary:hover {
    background: #E0611D !important;
}

/* Responsive Mobile Rules */
.ciie-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .ciie-saas-master-container {
        height: auto;
        min-height: 100vh;
        position: static;
        width: 100%;
        margin: 0;
        flex-direction: column;
    }
    .ciie-saas-sidebar {
        width: 100%;
        flex-shrink: 0;
    }
    .ciie-mobile-toggle {
        display: block;
    }
    .ciie-saas-nav {
        display: none;
    }
    .ciie-saas-nav.active-menu {
        display: flex;
    }
    .ciie-saas-main {
        padding: 20px;
    }
}