/* Seed products list */
#admin-seed-products-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-product-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  grid-template-rows: auto auto; /* content and actions rows */
  align-items: start;
  gap: 12px;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
}
.admin-product-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
}
.api-name { font-weight: 600; }
.api-price { color: #555; font-size: 13px; }
.api-price .price-old { text-decoration: line-through; color:#9e9e9e; margin-right:8px; }
.api-price .price-new { color:#e53935; font-weight:600; }
.api-category { margin: 6px 0; }
.api-category-select {
  min-width: 180px;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}
.api-details { color: #777; font-size: 12px; }
.api-actions {
  grid-column: 1 / -1; /* span full width below */
  grid-row: 2; /* force bottom row */
  align-self: end;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.api-actions .mdl-button[disabled] { opacity: 0.5; cursor: default; }

/* Inline edit rows */
.api-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.api-row label { min-width: 60px; color: #333; font-size: 13px; }
.api-row input,
.api-row textarea,
.api-row select {
  flex: 1;
  min-width: 180px;
}
.api-row textarea { min-height: 60px; }
/* Admin Panel Styles for Timeyon E-commerce Platform */

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.05)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.login-card {
    width: 450px;
    max-width: 90vw;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
}

.login-card .mdl-card__title {
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24, #ff9ff3);
    border-radius: 20px 20px 0 0;
    color: white !important;
}

.login-card .mdl-card__title-text {
    color: white !important;
    font-weight: 700;
    font-size: 1.8rem;
}

.login-card .mdl-textfield {
    width: 100%;
}

/* Admin Dashboard Header */
.mdl-layout__header {
    background: #f5f5f5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e0e0e0;
}

/* Responsive Header Row Styling */
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
    gap: 15px;
    background-color: black;
}

.header-row > div:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.header-row img {
    height: 40px;
    width: auto;
}

.header-row > div:first-child span {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.header-row nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-row nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.header-row nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.header-row nav a i {
    font-size: 16px;
}

/* Header search styles removed */

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.mdl-navigation__link {
    font-size: 14px;
    margin: 0 5px;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.mdl-navigation__link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.mdl-navigation__link:hover::before {
    left: 100%;
}

.mdl-navigation__link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Section Management */
.admin-section {
    display: none;
    padding: 30px;
    min-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.admin-section.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

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

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-header h3 {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24, #ff9ff3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    font-weight: 300;
}

/* Users Section */
.users-container {
    max-width: 1200px;
    margin: 0 auto;
}

.users-table {
    width: 100%;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.users-table th,
.users-table td {
    padding: 15px;
    text-align: left;
}

.users-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Orders Section */
.orders-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-order-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.admin-order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #ee5a24, #ff9ff3, #54a0ff);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
}

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

.order-id {
    font-weight: bold;
    color: #333;
    font-size: 18px;
}

.order-status-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-dot.pending {
    background-color: #f44336;
}

.status-dot.completed {
    background-color: #4caf50;
}

.complete-order-btn {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.complete-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.complete-order-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.customer-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.info-item {
    margin-bottom: 8px;
    color: #666;
}

.info-label {
    font-weight: bold;
    color: #333;
}

/* Product-specific order styles removed */

/* Product search section removed */

/* Add product section removed */

.file-input-container {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.file-input-container label {
    margin: 0;
}

#file-name,
#logo-file-name {
    color: #666;
    font-size: 14px;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Multiple image preview items */
.preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.preview-item .preview-image {
  width: 100%;
  height: 90px;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.primary-label { font-size: 12px; color: #555; }

/* Add Logo Section */
.add-logo-container {
    max-width: 600px;
    margin: 0 auto;
}

.add-logo-container .mdl-card {
    width: 100%;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.current-logo {
    text-align: center;
    margin-bottom: 30px;
}

.current-logo h4 {
    margin-bottom: 15px;
    color: #333;
}

.logo-preview {
    max-width: 200px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Contact Information Section */
.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-container .mdl-textfield {
    width: 100%;
    margin-bottom: 15px;
}

.contact-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

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

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-type {
    font-weight: bold;
    color: #333;
    text-transform: capitalize;
}

.contact-value {
    color: #666;
    font-size: 14px;
}

.delete-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

/* Social Media Section */
.social-container {
    max-width: 1000px;
    margin: 0 auto;
}

.social-container .mdl-textfield {
    width: 100%;
    margin-bottom: 15px;
}

.social-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.social-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-icon-preview {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 18px;
}

.social-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.social-name {
    font-weight: 500;
    color: #333;
}

.social-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.social-link:hover {
    color: #2196F3;
}

/* Category management styles removed */

/* Mobile Responsive */
/* Product Management responsive grid */
@media (max-width: 992px) {
  #products-section .mdl-grid { display: flex; flex-wrap: wrap; }
  #products-section .mdl-grid > .mdl-cell { flex: 1 1 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .header-row nav {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .header-row > div:nth-child(2) input {
        min-width: 150px;
        flex: 1;
    }
    
    .header-row nav a {
        padding: 6px 8px;
        font-size: 14px;
    }
    
    .login-card {
        margin: 20px;
    }
    
    .section-header h3 {
        font-size: 24px;
    }
    
    .order-details {
        grid-template-columns: 1fr;
    }
    
    .search-results {
        grid-template-columns: 1fr;
    }
    
    .order-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .order-status-controls {
        justify-content: center;
    }
    
    .contact-list-item,
    .social-list-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .file-input-container {
        flex-direction: column;
        text-align: center;
    }

    /* Compact product item card */
    .admin-product-item {
      grid-template-columns: 48px 1fr;
    }
    .admin-product-thumb { width: 48px; height: 48px; }
    .api-row input,
    .api-row textarea,
    .api-row select { min-width: 140px; }
}

@media (max-width: 480px) {
    .header-row {
        padding: 8px 15px;
    }
    
    .header-row nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .header-row nav a {
        text-align: center;
        padding: 10px;
    }
    
    .header-row > div:nth-child(2) input {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-section {
        padding: 10px;
    }
    
    .users-table {
        font-size: 12px;
    }
    
    .users-table th,
    .users-table td {
        padding: 8px;
    }
    
    .admin-order-card {
        padding: 15px;
    }
    
    .order-product-display {
        flex-direction: column;
        text-align: center;
    }

    /* Even more compact on small phones */
    .api-row label { min-width: 52px; font-size: 12px; }
    .preview-item .preview-image { height: 80px; }
}

/* Loading States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3f51b5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error States */
.success-message {
    color: #4caf50;
    background-color: #e8f5e8;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.error-message {
    color: #f44336;
    background-color: #ffeaea;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}
