/* Nasey Portal Styles v2.0 */

/* Auth Required */
.nasey-auth-required {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-box {
    background: var(--nasey-white);
    padding: 60px;
    border-radius: var(--nasey-radius-xl);
    text-align: center;
    box-shadow: var(--nasey-shadow-xl);
    max-width: 450px;
}

.auth-icon {
    color: var(--nasey-primary);
    margin-bottom: 24px;
}

.auth-box h2 {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--nasey-gray-900);
}

.auth-box p {
    color: var(--nasey-gray-500);
    margin-bottom: 32px;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Portal Layout */
.nasey-portal {
    display: flex;
    min-height: calc(100vh - 200px);
    background: var(--nasey-gray-50);
    margin: -20px;
    padding: 0;
}

.portal-sidebar {
    width: 280px;
    background: var(--nasey-white);
    border-left: 1px solid var(--nasey-gray-200);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.user-profile {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--nasey-gray-200);
    margin-bottom: 24px;
}

.user-profile .avatar {
    margin-bottom: 12px;
}

.user-profile .avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--nasey-primary);
}

.user-profile h3 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--nasey-gray-900);
}

.user-profile .user-role {
    display: inline-block;
    padding: 4px 12px;
    background: var(--nasey-gradient);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.portal-nav {
    flex: 1;
}

.portal-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--nasey-gray-600);
    text-decoration: none;
    border-radius: var(--nasey-radius);
    margin-bottom: 4px;
    transition: all 0.3s;
}

.portal-nav .nav-item:hover {
    background: var(--nasey-gray-100);
    color: var(--nasey-gray-800);
}

.portal-nav .nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--nasey-primary);
}

.portal-nav .nav-icon {
    font-size: 20px;
}

.portal-sidebar .quick-actions {
    padding-top: 24px;
    border-top: 1px solid var(--nasey-gray-200);
}

.portal-sidebar .action-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: var(--nasey-gradient);
    color: white;
    text-decoration: none;
    border-radius: var(--nasey-radius);
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.portal-sidebar .action-btn.secondary {
    background: var(--nasey-gray-100);
    color: var(--nasey-gray-700);
}

.portal-sidebar .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--nasey-shadow);
}

.portal-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

/* Overview Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h1 {
    font-size: 28px;
    color: var(--nasey-gray-900);
    margin: 0;
}

.section-header p {
    color: var(--nasey-gray-500);
    margin: 8px 0 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--nasey-white);
    border-radius: var(--nasey-radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--nasey-shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--nasey-gradient);
}

.stat-card.domains::before { background: linear-gradient(180deg, #667eea, #764ba2); }
.stat-card.hosting::before { background: linear-gradient(180deg, #10b981, #059669); }
.stat-card.invoices::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.stat-card.tickets::before { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }

.stat-icon {
    font-size: 40px;
}

.stat-info {
    flex: 1;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--nasey-gray-900);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: var(--nasey-gray-500);
    margin-top: 4px;
}

.stat-link {
    font-size: 13px;
    color: var(--nasey-primary);
    text-decoration: none;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.overview-grid .card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--nasey-gray-900);
}

.activity-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--nasey-gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 20px;
}

.activity-text {
    display: block;
    color: var(--nasey-gray-700);
}

.activity-time {
    display: block;
    font-size: 12px;
    color: var(--nasey-gray-400);
    margin-top: 4px;
}

.quick-services .services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.quick-services .service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--nasey-gray-50);
    border-radius: var(--nasey-radius);
    text-decoration: none;
    color: var(--nasey-gray-700);
    font-size: 13px;
    text-align: center;
    transition: all 0.3s;
}

.quick-services .service-item:hover {
    background: var(--nasey-gradient);
    color: white;
    transform: translateY(-3px);
}

.quick-services .service-item .icon {
    font-size: 28px;
}

/* Services Section */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--nasey-white);
    border-radius: var(--nasey-radius-lg);
    padding: 24px;
    box-shadow: var(--nasey-shadow);
    border-right: 4px solid var(--nasey-gray-300);
}

.service-card.status-in_progress { border-right-color: var(--nasey-primary); }
.service-card.status-completed { border-right-color: var(--nasey-success); }
.service-card.status-pending { border-right-color: var(--nasey-warning); }

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.service-type {
    font-size: 13px;
    color: var(--nasey-gray-500);
}

.service-status {
    font-size: 12px;
    font-weight: 600;
}

.service-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--nasey-gray-900);
}

.service-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.service-progress .progress-bar {
    flex: 1;
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--nasey-primary);
}

.service-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--nasey-gray-500);
    margin-bottom: 16px;
}

.meta-item .icon {
    margin-left: 4px;
}

/* Domains & Hosting */
.domains-table-wrapper,
.invoices-table-wrapper {
    background: var(--nasey-white);
    border-radius: var(--nasey-radius-lg);
    overflow: hidden;
    box-shadow: var(--nasey-shadow);
}

.domain-name {
    font-weight: 600;
    font-family: monospace;
    direction: ltr;
    text-align: left;
}

.hosting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hosting-card {
    background: var(--nasey-white);
    border-radius: var(--nasey-radius-lg);
    padding: 24px;
    box-shadow: var(--nasey-shadow);
}

.hosting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.package-badge {
    background: var(--nasey-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.hosting-domain {
    font-size: 18px;
    margin-bottom: 20px;
    direction: ltr;
    text-align: left;
}

.hosting-stats .stat {
    margin-bottom: 12px;
}

.hosting-stats .label {
    display: block;
    font-size: 12px;
    color: var(--nasey-gray-500);
    margin-bottom: 4px;
}

.hosting-stats .progress-mini {
    height: 6px;
    background: var(--nasey-gray-200);
    border-radius: 3px;
    margin-bottom: 4px;
}

.hosting-stats .progress-mini .progress-fill {
    height: 100%;
    background: var(--nasey-gradient);
    border-radius: 3px;
}

.hosting-stats .value {
    font-size: 12px;
    color: var(--nasey-gray-600);
}

.hosting-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--nasey-gray-500);
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid var(--nasey-gray-100);
}

.hosting-actions {
    display: flex;
    gap: 8px;
}

/* Tickets */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--nasey-white);
    padding: 20px;
    border-radius: var(--nasey-radius-lg);
    box-shadow: var(--nasey-shadow);
}

.ticket-item.priority-urgent {
    border-right: 4px solid var(--nasey-danger);
}

.ticket-item.priority-high {
    border-right: 4px solid var(--nasey-warning);
}

.ticket-info {
    flex: 1;
}

.ticket-id {
    font-size: 12px;
    color: var(--nasey-gray-400);
}

.ticket-info h4 {
    font-size: 16px;
    margin: 4px 0 8px;
    color: var(--nasey-gray-900);
}

.ticket-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--nasey-gray-500);
}

.ticket-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Settings */
.settings-form {
    background: var(--nasey-white);
    padding: 30px;
    border-radius: var(--nasey-radius-lg);
    box-shadow: var(--nasey-shadow);
}

/* Responsive Portal */
@media (max-width: 1024px) {
    .nasey-portal {
        flex-direction: column;
    }

    .portal-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--nasey-gray-200);
    }

    .portal-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .portal-nav .nav-item {
        flex: 1;
        min-width: 100px;
        text-align: center;
        flex-direction: column;
        gap: 4px;
        padding: 10px;
    }

    .portal-sidebar .quick-actions {
        display: none;
    }

    .portal-content {
        padding: 20px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-card::before {
        width: 100%;
        height: 4px;
        top: 0;
        right: 0;
    }

    .quick-services .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-list,
    .hosting-grid {
        grid-template-columns: 1fr;
    }

    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .ticket-status {
        width: 100%;
        justify-content: space-between;
    }
}
