/* SME User Dashboard Styles */
/* Color Palette: #E62727 (Primary Red), #7f8c8d (Secondary Gray), #FFFFFF (White) */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c3e50;
    line-height: 1.6;
}

/* Navigation Styles */
.navbar {
    background: #FFFFFF;
    box-shadow: 0 2px 20px rgba(230, 39, 39, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

.nav-container {
    max-width: 100%;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-logo {
    height: 45px;
    width: auto;
    border-radius: 8px;
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E62727;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f8c8d;
    font-weight: 500;
}

.user-info i {
    font-size: 1.5rem;
    color: #E62727;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #E62727;
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #7f8c8d;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: #FFFFFF;
    border-right: 1px solid rgba(127, 140, 141, 0.1);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(127, 140, 141, 0.1);
}

.sidebar-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header i {
    color: #E62727;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #7f8c8d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.nav-item.active {
    background: rgba(230, 39, 39, 0.1);
    color: #E62727;
    border-left-color: #E62727;
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 30px;
    flex: 1;
    width: calc(100% - 280px);
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-card {
    background: linear-gradient(135deg, #E62727 0%, #c41e3a 100%);
    color: #FFFFFF;
    padding: 40px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(230, 39, 39, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.welcome-text {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.business-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
}

.welcome-image {
    position: relative;
    z-index: 1;
}

.welcome-image i {
    font-size: 4rem;
    opacity: 0.3;
}

/* Stats Section */
.stats-section {
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.stat-card {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(127, 140, 141, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #E62727;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #E62727, #c41e3a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(230, 39, 39, 0.3);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #7f8c8d;
    font-weight: 500;
}

.stat-trend {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 0.9rem;
}

.stat-trend.positive {
    background: #27ae60;
}

.stat-trend.neutral {
    background: #7f8c8d;
}

/* Actions Section */
.actions-section {
    margin-bottom: 40px;
}

.actions-section h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.actions-section h2 i {
    color: #E62727;
}

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

.action-card {
    background: #FFFFFF;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(127, 140, 141, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(230, 39, 39, 0.1), transparent);
    transition: left 0.6s ease;
}

.action-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.action-content {
    flex: 1;
}

.action-content h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.action-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.action-arrow {
    color: #7f8c8d;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Recent Activity Section */
.recent-section {
    margin-bottom: 30px;
}

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

.section-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i {
    color: #E62727;
}

.view-all-btn {
    color: #E62727;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border: 2px solid #E62727;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.activity-card {
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(127, 140, 141, 0.1);
    overflow: hidden;
}

.activity-list {
    padding: 20px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(127, 140, 141, 0.1);
}

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

.activity-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
}

.activity-content p {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 3px;
}

.activity-time {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.no-activity {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.no-activity i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-activity p {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.no-activity small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Adjusted for less cramped layout */
.page-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
}

.page-title h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title h1 i {
    color: #E62727;
}

.page-title p {
    color: #7f8c8d;
    font-size: 1.2rem;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    grid-template-areas: 
        "profile info"
        "business info"
        "details info"
        "password subscription";
}

.profile-section { grid-area: profile; }
.business-section { grid-area: business; }
.info-section { grid-area: info; }
.account-details-section { grid-area: details; }
.password-section { grid-area: password; }
.subscription-section { grid-area: subscription; }

.profile-card, .info-card, .business-card, .account-details-card, .password-card, .subscription-card {
    background: #FFFFFF;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(127, 140, 141, 0.1);
    overflow: hidden;
}

.profile-header, .info-header, .business-header, .account-details-header, .password-header, .subscription-header {
    background: linear-gradient(135deg, #E62727, #c41e3a);
    color: white;
    padding: 20px 25px;
}

.profile-header h3, .info-header h3, .business-header h3, .account-details-header h3, .password-header h3, .subscription-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.profile-content, .business-content, .account-details-content, .password-content, .subscription-content {
    padding: 25px;
    width: 100%;
    box-sizing: border-box;
}

.current-photo {
    text-align: center;
    margin-bottom: 25px;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #E62727;
    box-shadow: 0 5px 20px rgba(230, 39, 39, 0.2);
}

.no-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #7f8c8d;
}

.no-photo i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.file-input-wrapper {
    margin-bottom: 20px;
}

.file-input-wrapper input[type="file"] {
    display: none;
}

.file-input-label {
    display: inline-block;
    padding: 12px 25px;
    background: #7f8c8d;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.file-input-label:hover {
    background: #6c7b7d;
    transform: translateY(-2px);
}

.file-input-label.file-selected {
    background: #27ae60;
}

.btn-upload {
    width: 100%;
    padding: 12px 25px;
    background: #E62727;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-upload:hover {
    background: #c41e3a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 39, 39, 0.3);
}

.info-form {
    padding: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-input {
    padding: 12px 15px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: #E62727;
    background: white;
    box-shadow: 0 0 0 3px rgba(230, 39, 39, 0.1);
}

.form-input.error {
    border-color: #e74c3c;
}

.form-actions {
    text-align: right;
}

.btn-primary {
    padding: 15px 30px;
    background: #E62727;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* change: use serif for Add New Item and primary buttons */
}

.btn-primary:hover {
    background: #c41e3a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(230, 39, 39, 0.3);
}

.business-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.business-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.business-item.full-width {
    grid-column: 1 / -1;
}

.business-item label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.business-item span {
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(127, 140, 141, 0.1);
}

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

.detail-item label {
    font-weight: 600;
    color: #7f8c8d;
}

.detail-item span {
    color: #2c3e50;
    font-weight: 500;
}

.account-type {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #E62727 !important;
    font-weight: 600 !important;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .account-grid {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "profile"
            "business"
            "info"
            "details"
            "password"
            "subscription";
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-title {
        font-size: 1.2rem;
    }
    
    .user-name {
        display: none;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .welcome-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 30px 20px;
    }
    
    .welcome-content h1 {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .action-card {
        padding: 20px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .welcome-content h1 {
        font-size: 1.5rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .actions-section h2,
    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* Password & Subscription UI additions */
.password-card .password-content { padding: 20px; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon .form-input { flex: 1; padding-right: 44px; }
.toggle-password { position: absolute; right: 6px; background: transparent; border: none; cursor: pointer; color: #7f8c8d; padding: 8px; border-radius: 6px; }
.toggle-password i { pointer-events: none; }
.strength-meter { height: 8px; background: #eee; border-radius: 6px; margin-top: 8px; overflow: hidden; }
.strength-bar { height: 100%; width: 0%; background: #e74c3c; transition: width 200ms ease, background 200ms ease; border-radius: 6px; }
.helper-text { display:block; color:#7f8c8d; font-size:0.85rem; margin-top:6px; }

/* Subscription plans */
.plan-options { display:flex; gap:12px; flex-wrap:wrap; }
.plan-option { display:flex; align-items:center; gap:12px; padding:14px; border-radius:10px; border:1px solid rgba(0,0,0,0.06); cursor:pointer; width:220px; background:#fff; transition:box-shadow 150ms ease, transform 150ms ease; }
.plan-option input[type="radio"] { display:none; }
.plan-option .plan-info { display:flex; flex-direction:column; }
.plan-title { font-weight:700; color:#2c3e50; }
.plan-desc { font-size:0.9rem; color:#7f8c8d; margin-top:4px; }
.plan-price { margin-top:8px; font-weight:700; color:#E62727; }
.plan-option:hover { transform:translateY(-4px); box-shadow:0 8px 30px rgba(0,0,0,0.06); }
.plan-option.plan-selected { border-color:#E62727; box-shadow:0 12px 35px rgba(230,39,39,0.12); }

/* Subscription file input */
.subscription-file-label { display:inline-flex; align-items:center; gap:10px; padding:10px 14px; background:#7f8c8d; color:#fff; border-radius:8px; cursor:pointer; width:100%; justify-content:center; }
.subscription-file-label .file-name { font-weight:600; }
.file-input-wrapper input[type="file"] { display:none; }

/* Keep input error style consistent */
input.error { box-shadow: 0 0 0 3px rgba(231,76,60,0.08); border-color:#e74c3c; }

/* Small responsiveness */
@media (max-width:768px) {
    .plan-options { justify-content: space-between; }
    .plan-option { width:48%; }
}
@media (max-width:480px) {
    .plan-option { width:100%; }
}