/* Minha Conta - User Area Styles */

.account-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.account-sidebar {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #f0f0f0;
}

.sidebar-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #333;
}

.sidebar-header p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link i {
    width: 20px;
    font-size: 1.1rem;
}

.sidebar-link:hover {
    background: #f8f8f8;
    color: #000;
}

.sidebar-link.active {
    background: #000;
    color: white;
}

.sidebar-link.logout {
    color: #d32f2f;
    margin-top: 0.5rem;
}

.sidebar-link.logout:hover {
    background: #ffebee;
}

.sidebar-nav hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Main Content */
.account-content {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.account-section {
    display: none;
}

.account-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.account-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.8rem;
    color: #333;
}

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

.section-header h2 {
    margin: 0;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-card i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.dashboard-card h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Recent Activity */
.recent-activity {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
}

.recent-activity h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
}

/* Forms */
.account-form {
    max-width: 700px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #000;
}

.form-group input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-container {
    background: #f8f8f8;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.form-container h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
}

/* Profile Photo Section */
.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f0f0f0;
}

/* Address List */
.address-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.address-card {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
}

.address-card.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.address-card .default-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.address-card h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.address-card p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.address-card-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
}

.address-card.default .address-card-actions {
    border-top-color: rgba(255,255,255,0.3);
}

/* Prescription List */
.prescription-list {
    display: grid;
    gap: 1.5rem;
}

.prescription-card {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
    position: relative;
}

.prescription-card.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.prescription-card .default-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #4caf50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.prescription-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.prescription-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.prescription-header p {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    opacity: 0.8;
}

.prescription-eyes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.eye-section {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
}

.prescription-card.default .eye-section {
    background: rgba(255,255,255,0.15);
}

.eye-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.eye-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.eye-value {
    display: flex;
    flex-direction: column;
}

.eye-value label {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.eye-value span {
    font-size: 1.1rem;
    font-weight: 600;
}

.prescription-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    gap: 1rem;
}

.prescription-card.default .prescription-actions {
    border-top-color: rgba(255,255,255,0.3);
}

/* Orders List */
.order-card {
    background: #f8f8f8;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.order-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
}

.order-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.order-status.pending { background: #fff3cd; color: #856404; }
.order-status.processing { background: #d1ecf1; color: #0c5460; }
.order-status.shipped { background: #d4edda; color: #155724; }
.order-status.delivered { background: #d4edda; color: #155724; }
.order-status.cancelled { background: #f8d7da; color: #721c24; }

.order-items {
    margin: 1rem 0;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.order-item-info {
    flex: 1;
}

.order-item-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.order-item-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.order-total {
    text-align: right;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #ddd;
}

.order-total h4 {
    margin: 0;
    font-size: 1.3rem;
    color: #333;
}

/* Products Grid (Recommendations) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card-info {
    padding: 1.25rem;
}

.product-card-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.05rem;
    color: #333;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000;
    margin: 0.5rem 0;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-primary {
    background: #000;
    color: white;
}

.btn-primary:hover {
    background: #333;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-small {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .account-container {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-link span {
        display: none;
    }

    .sidebar-link {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .account-container {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .account-content {
        padding: 1.5rem;
    }

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .prescription-eyes {
        grid-template-columns: 1fr;
    }

    .address-list {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
