/**
 * Ahtimam E-Commerce Platform
 * Merchant Dashboard Styles - Glassmorphism Design
 */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

:root {
    --primary-blue: #2196F3;
    --primary-orange: #FF9800; /* برتقالي للأزرار والأيقونات */
    --white: #FFFFFF;
    --success: #0a96f4;
    --danger: #36bef4;
    --warning: #0772ff;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
}

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

body {
    font-family: 'Cairo', sans-serif;
    background: #2196F3; /* لون ثابت بدون تدرج */
    background-attachment: fixed;
    color: #424242;
    line-height: 1.6;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-left: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    margin-bottom: 20px;
}

.logo i {
    font-size: 32px;
    color: var(--primary-orange);
}

.logo h2 {
    font-size: 24px;
    font-weight: 700;
}

.store-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.store-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.store-info h3 {
    color: white;
    font-size: 16px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 5px 15px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
}

.sidebar-nav a i {
    font-size: 20px;
    width: 25px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: rgba(244, 67, 54, 0.2);
    color: white;
    border: 1px solid rgba(244, 67, 54, 0.5);
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(244, 67, 54, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.btn-menu {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: none;
}

.header h1 {
    color: white;
    font-size: 24px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
    color: white;
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 24px;
}

.notifications .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-orange);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merchant-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.merchant-profile i {
    font-size: 32px;
}

/* Content */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

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

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

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.stat-icon.orange {
    color: var(--primary-orange);
    background: rgba(255, 152, 0, 0.2);
}

.stat-icon.blue {
    color: var(--primary-blue);
    background: rgba(33, 150, 243, 0.2);
}

.stat-icon.green {
    color: var(--success);
    background: rgba(76, 175, 80, 0.2);
}

.stat-info h4 {
    font-size: 28px;
    color: white;
    margin-bottom: 5px;
}

.stat-info p {
    color: white;
    opacity: 0.9;
}

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

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
}

.product-info {
    padding: 15px;
    color: white;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    color: var(--primary-orange);
    font-weight: 700;
    margin-bottom: 10px;
}

.product-price.discounted {
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-price .old-price {
    font-size: 14px;
    text-decoration: line-through;
    color: rgba(255, 255, 255, 0.6);
}

.product-stock {
    font-size: 14px;
    margin-bottom: 10px;
}

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

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

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

.btn-primary:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

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

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

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 13px;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--glass-bg);
}

thead th {
    padding: 15px;
    text-align: right;
    color: white;
    font-weight: 600;
}

tbody tr {
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-body {
    color: white;
}

.info-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.info-box i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    opacity: 0.8;
}

.info-box div {
    font-size: 16px;
    font-weight: 600;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    color: white;
}

.modal-header h3 {
    font-size: 24px;
}

.btn-close {
    background: rgba(244, 67, 54, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

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

/* Login Card */
.login-card {
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 60px;
    color: var(--primary-orange);
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 32px;
    color: white;
}

.login-header p {
    color: white;
    opacity: 0.8;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Error Message */
.error-message {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid var(--danger);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

/* Badge */
.badge-success {
    background: var(--success);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-warning {
    background: var(--warning);
    color: #424242;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-danger {
    background: var(--danger);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 999;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .btn-menu {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Additional Styles for Settings & Profile */
.row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.col-md-6 {
    flex: 1;
    min-width: 250px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.08);
}

.form-input:read-only {
    background: rgba(255,255,255,0.02);
    cursor: not-allowed;
    opacity: 0.7;
}

textarea.form-input {
    resize: vertical;
    font-family: inherit;
}

.btn-warning {
    background: var(--warning);
    color: #424242;
}

.btn-warning:hover {
    background: #e0a800;
}

small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

/* Stat boxes */
.stat-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(242, 100, 25, 0.2);
}
