/**
 * Client Area Stylesheet - HostArmada Style
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #6B46C1;
    --primary-purple-dark: #553C9A;
    --primary-purple-light: #8B5CF6;
    --sidebar-bg: #4C1D95;
    --sidebar-hover: #5B21B6;
    --bg-light: #F3F4F6;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --white: #FFFFFF;
    --badge-red: #EF4444;
    --border-color: #E5E7EB;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    position: sticky;
    top: 0;
}

.header-left .logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-purple);
    letter-spacing: 1px;
}

.logo-tagline {
    font-size: 11px;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-size: 14px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-light);
    color: var(--primary-purple);
}

/* App Body */
.app-body {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--white);
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    align-self: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-top: 30px;
}

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--white);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--sidebar-hover);
}

.nav-item.active {
    background: var(--primary-purple);
    border-left: 3px solid var(--white);
    padding-right: 35px; /* Add padding to make room for arrow */
}

.nav-item.active::after {
    content: '→';
    position: absolute;
    right: 15px;
    font-weight: bold;
    z-index: 1;
}

.nav-icon {
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
    font-size: 14px;
}

.nav-badge {
    background: var(--badge-red);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    margin-left: auto;
    margin-right: 5px; /* Add margin to prevent overlap with arrow */
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    background: var(--bg-light);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    font-size: 24px;
}

.section-description {
    color: var(--text-light);
    font-size: 14px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-purple);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.stat-item {
    font-size: 14px;
    color: var(--text-light);
}

.stat-badge {
    background: var(--badge-red);
    color: var(--white);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

.stat-badge.amount {
    background: var(--primary-purple);
}

.card-actions {
    display: flex;
    gap: 10px;
}

.card-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
}

.card-btn:hover {
    background: var(--primary-purple);
    color: var(--white);
    border-color: var(--primary-purple);
}

/* Info Section */
.info-section {
    margin-top: 30px;
}

.info-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.info-section-desc {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

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

.info-card {
    background: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--primary-purple);
    margin-bottom: 20px;
    font-size: 18px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 14px;
}

.info-value {
    color: var(--text-dark);
    text-align: right;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-open {
    background: #DBEAFE;
    color: #1E40AF;
}

.status-badge.status-closed {
    background: #D1FAE5;
    color: #065F46;
}

.status-badge.status-pending {
    background: #FEF3C7;
    color: #92400E;
}

.status-active {
    background: #D1FAE5;
    color: #065F46;
}

.status-inactive {
    background: #FEE2E2;
    color: #991B1B;
}

/* Support Section Styles */
.support-card {
    margin-top: 20px;
}

.support-info {
    margin-bottom: 20px;
}

.support-info p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.7;
}

.support-list {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.support-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
}

.support-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-purple);
    font-weight: bold;
}

.support-note {
    background: #F0F9FF;
    border-left: 4px solid var(--primary-purple);
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-purple);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 70, 193, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Service and Domain Items */
.service-item,
.domain-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.service-header,
.domain-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.service-header h4,
.domain-header h4 {
    margin: 0 0 5px 0;
    color: var(--text-dark);
    font-size: 18px;
}

.service-desc,
.domain-desc {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.service-details,
.domain-details {
    margin-bottom: 15px;
}

.service-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Ticket Items */
.ticket-list {
    margin-bottom: 20px;
}

.ticket-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ticket-header h4 {
    margin: 0 0 5px 0;
    color: var(--text-dark);
    font-size: 16px;
}

.ticket-meta {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

/* Messages */
.error-message {
    background: #FEE2E2;
    color: #991B1B;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #FECACA;
}

.success-message {
    background: #D1FAE5;
    color: #065F46;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #A7F3D0;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 18px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal[style*="display: block"],
.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: var(--white);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-purple);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-content form {
    padding: 30px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
}

.login-box {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-purple);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        min-height: auto;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 10px 0;
    }
    
    .nav-section {
        margin-top: 0;
        display: flex;
    }
    
    .nav-section-title {
        display: none;
    }
    
    .nav-item {
        white-space: nowrap;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .info-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .top-header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-tagline {
        font-size: 10px;
    }
}
