/* Admin Panel Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 20px;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logout-btn {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.logout-btn:hover {
    background: #c82333;
}

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

.card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.card h3 {
    margin: 0 0 15px 0;
    color: #495057;
}

/* Login Page Styles */
.login-body {
    margin: 0;
    padding: 0;
    background-color: #C08F0A;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Dust Effect for Login */
.dust-scene {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.dust-scene li {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.dust-specks {
    position: absolute;
    z-index: 999;
    height: 100vh;
    width: 100vw;
}

.dust-speck {
    opacity: 0;
    height: 4px;
    width: 4px;
    background: rgba(255, 255, 255, 0.9);
    position: absolute;
    border-radius: 50%;
    z-index: 99;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
}

.dust-layer {
    position: absolute;
    height: 200vh;
    width: 200vw;
    top: -50vh;
    left: -50vw;
    animation-timing-function: linear;
    animation-name: dust-float;
    animation-iteration-count: infinite;
}

.dust-layer-1 {
    opacity: 0.25;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 1px, transparent 1px),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
                radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
                radial-gradient(circle at 60% 10%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
                radial-gradient(circle at 10% 60%, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 150px 150px, 200px 200px, 180px 180px, 120px 120px, 160px 160px;
    animation-duration: 120s;
}

.dust-layer-2 {
    opacity: 0.2;
    background: radial-gradient(circle at 60% 20%, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
                radial-gradient(circle at 30% 60%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
                radial-gradient(circle at 90% 40%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
                radial-gradient(circle at 15% 85%, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
                radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 130px 130px, 170px 170px, 140px 140px, 110px 110px, 190px 190px;
    animation-duration: 90s;
}

.dust-layer-3 {
    opacity: 0.15;
    background: radial-gradient(circle at 10% 50%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
                radial-gradient(circle at 70% 10%, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
                radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
                radial-gradient(circle at 85% 60%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100px 100px, 140px 140px, 120px 120px, 90px 90px, 160px 160px;
    animation-duration: 70s;
}

@keyframes dust-float {
    0% {
        transform: translate(0px, 0px);
    }
    100% {
        transform: translate(100vw, 50vh);
    }
}

@keyframes dust-twinkle {
    0% {
        transform: translate(0px, 0px);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    80% {
        opacity: 0.6;
    }
    100% {
        transform: translate(150px, 80px);
        opacity: 0;
    }
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 10;
}

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

.login-header h1 {
    margin: 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #C08F0A;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #C08F0A;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background: #a67808;
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.error {
    background: #ffe6e6;
    color: #d63031;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #fab1a0;
}

.attempts {
    text-align: center;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dust-layer {
        height: 150vh;
        width: 150vw;
        top: -25vh;
        left: -25vw;
    }
    
    .dust-layer-1 { animation-duration: 80s; }
    .dust-layer-2 { animation-duration: 60s; }
    .dust-layer-3 { animation-duration: 50s; }
} 

/* Content Management Styles */
.section {
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section h2 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #C08F0A;
    color: #333;
}

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

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.btn-success {
    background: #28a745;
    color: white;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

.items-list {
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

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

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

.item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-image: 
        linear-gradient(45deg, #666 25%, transparent 25%),
        linear-gradient(-45deg, #666 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #666 75%),
        linear-gradient(-45deg, transparent 75%, #666 75%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
    background-color: #999;
}

.item-info {
    flex: 1;
}

.item-info h4 i {
    margin-right: 8px;
    color: #C08F0A;
}

.item-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
    min-width: 200px; /* Fixed width to prevent jumping */
}

.reorder-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-right: 5px;
}

.btn-reorder {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 16px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-reorder:hover:not(:disabled) {
    background: #5a6268;
}

.btn-reorder:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h3 {
    margin-top: 0;
}

.alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    padding: 10px;
    border-radius: 4px;
}

.image-item {
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.image-item.selected {
    border-color: #C08F0A;
    border-width: 4px;
    box-shadow: 0 0 8px rgba(192, 143, 10, 0.3);
}

.image-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    display: block;
    background-image: 
        linear-gradient(45deg, #666 25%, transparent 25%),
        linear-gradient(-45deg, #666 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #666 75%),
        linear-gradient(-45deg, transparent 75%, #666 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
    background-color: #999;
}

.image-item .delete-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: none;
}

.image-item:hover .delete-btn {
    display: block;
}

.add-image-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    color: #6c757d;
    font-size: 24px;
    transition: all 0.3s;
}

.add-image-btn:hover {
    border-color: #C08F0A;
    color: #C08F0A;
}

/* Icon Picker Styles */
.icon-picker {
    position: relative;
}

.icon-search {
    width: 100%;
    padding: 10px 40px 10px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
}

.icon-preview {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #C08F0A;
}

.icon-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.icon-option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-option:hover {
    background: #f8f9fa;
}

.icon-option.selected {
    background: #C08F0A;
    color: white;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Content Management Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .item-actions {
        width: 100%;
        justify-content: flex-end;
    }
} 