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

:root {
    --primary: #5865F2;
    --primary-dark: #4752C4;
    --secondary: #57F287;
    --danger: #ED4245;
    --background: #000000;
    --surface: #000000;
    --text: #000000;
    --text-muted: #000000;
    --border: #000000;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    min-height: 100vh;
    color: var(--text);
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

body.loaded {
    opacity: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background-color: var(--surface);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

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

.nav-brand h1 {
    font-size: 1.5rem;
    color: var(--secondary);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: nowrap;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    background-color: var(--border);
    color: var(--text);
}

.btn:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

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

.btn-secondary {
    background-color: var(--secondary);
    color: #000;
}

.btn-login {
    background-color: var(--primary);
    padding: 10px 20px;
    border-radius: 5px;
}

.btn-logout {
    background-color: var(--danger);
    padding: 8px 15px;
    border-radius: 5px;
}

.btn-theme {
    background-color: var(--primary);
    color: var(--text);
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-theme:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    background-color: var(--surface);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--secondary);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Features Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-card {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.feature-card p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* CTA Section */
.cta-section {
    background-color: var(--surface);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.cta-section h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

.cta-section p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background-color: var(--surface);
    padding: 20px;
    border-radius: 10px;
}

.page-header h2 {
    color: var(--secondary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.no-items {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

/* Search Box */
.search-box {
    flex: 1;
    max-width: 400px;
    margin-left: 30px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--background);
    color: var(--text);
}

/* Catalog Controls */
.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Filters Section */
.filters-section {
    background-color: var(--surface);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.filters-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: var(--background);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    min-width: 180px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-results {
    margin-top: 15px;
    padding: 10px;
    background-color: rgba(88, 101, 242, 0.1);
    border-radius: 5px;
    color: var(--text);
    font-size: 0.95rem;
    display: none;
}

.view-tabs {
    display: flex;
    gap: 10px;
    background-color: var(--surface);
    padding: 5px;
    border-radius: 8px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.tab-btn:hover {
    background-color: rgba(88, 101, 242, 0.1);
    color: var(--text);
}

.tab-btn.active {
    background-color: var(--primary);
    color: var(--text);
}

/* Users Grid */
.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.user-card {
    background-color: var(--surface);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.user-card:hover {
    transform: translateY(-3px);
    background-color: #2a2d31;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.user-avatar {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
}

.user-card .user-info {
    flex: 1;
}

.user-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.user-card .clothing-count {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.section-header h3 {
    color: var(--secondary);
    font-size: 1.3rem;
}

/* Catalog Grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.clothing-card {
    background-color: var(--surface);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.3),
        0 0 15px rgba(88, 101, 242, 0.15);
    transition: all 0.2s ease;
    max-width: 350px;
    border: 2px solid var(--border);
    position: relative;
}

.clothing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), transparent, var(--secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.clothing-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 6px 20px rgba(0,0,0,0.4),
        0 0 20px rgba(88, 101, 242, 0.25),
        0 0 30px rgba(87, 242, 135, 0.1);
    border-color: var(--primary);
}

.clothing-card:hover::before {
    opacity: 0.6;
}

.clothing-image {
    width: 100%;
    height: 200px;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.clothing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.clothing-info {
    padding: 20px;
}

.clothing-info h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

.clothing-info .owner {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.clothing-info .description {
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clothing-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.clothing-info .description {
    margin: 10px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

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

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    opacity: 1;
    pointer-events: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content {
    background: linear-gradient(135deg, #0a0a0a 0%, #000000 100%);
    padding: 20px;
    border-radius: 20px;
    width: 85%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    box-shadow: 
        0 0 50px rgba(0, 0, 0, 0.4),
        0 20px 60px rgba(0,0,0,0.8),
        inset 0 0 80px rgba(0, 0, 0, 0.05);
    border: 3px solid #1a1a1a;
    transform: translateY(-30px) scale(0.9);
    margin: 20px;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal[style*="display: flex"] .modal-content,
.modal[style*="display:flex"] .modal-content {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    box-shadow: 
        0 0 50px rgba(88, 101, 242, 0.4),
        0 20px 60px rgba(0,0,0,0.8),
        inset 0 0 80px rgba(88, 101, 242, 0.05);
    border-color: var(--primary);
    transform: translateY(0) scale(1);
}

.modal-content form {
    max-height: calc(80vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: #000000;
    border-radius: 20px;
    z-index: -1;
    opacity: 0.2;
    filter: blur(15px);
    transition: background 0.6s ease, opacity 0.6s ease;
}

.modal[style*="display: flex"] .modal-content::before,
.modal[style*="display:flex"] .modal-content::before {
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
}

.modal-content h3 {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.close {
    color: var(--text-muted);
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.close:hover {
    color: var(--danger);
    transform: rotate(90deg) scale(1.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background-color: var(--background);
    color: var(--text);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
    transform: translateY(-2px);
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.modal-actions .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 1rem;
}

/* Diálogos personalizados */
.custom-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-dialog-overlay.show {
    opacity: 1;
}

.custom-dialog {
    background: linear-gradient(135deg, var(--surface) 0%, var(--background) 100%);
    padding: 35px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 
        0 0 40px rgba(88, 101, 242, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 0 80px rgba(88, 101, 242, 0.05);
    border: 3px solid var(--primary);
    position: relative;
    transform: translateY(-30px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.5s ease, border-color 0.5s ease;
    animation: borderGlow 2s infinite alternate;
}

@keyframes borderGlow {
    0% {
        box-shadow: 
            0 0 40px rgba(88, 101, 242, 0.4),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(88, 101, 242, 0.05);
    }
    100% {
        box-shadow: 
            0 0 60px rgba(88, 101, 242, 0.6),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(88, 101, 242, 0.1);
    }
}

.custom-dialog::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(10px);
    transition: background 0.5s ease;
}

.custom-dialog-overlay.show .custom-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.custom-dialog.error {
    border-color: var(--danger);
    animation: borderGlowError 2s infinite alternate;
}

.custom-dialog.error::before {
    background: linear-gradient(45deg, var(--danger), #ff6b6b, var(--danger));
}

@keyframes borderGlowError {
    0% {
        box-shadow: 
            0 0 40px rgba(237, 66, 69, 0.4),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(237, 66, 69, 0.05);
    }
    100% {
        box-shadow: 
            0 0 60px rgba(237, 66, 69, 0.7),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(237, 66, 69, 0.1);
    }
}

.custom-dialog.success {
    border-color: var(--secondary);
    animation: borderGlowSuccess 2s infinite alternate;
}

.custom-dialog.success::before {
    background: linear-gradient(45deg, var(--secondary), #5affb0, var(--secondary));
}

@keyframes borderGlowSuccess {
    0% {
        box-shadow: 
            0 0 40px rgba(87, 242, 135, 0.4),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(87, 242, 135, 0.05);
    }
    100% {
        box-shadow: 
            0 0 60px rgba(87, 242, 135, 0.7),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(87, 242, 135, 0.1);
    }
}

.custom-dialog.warning {
    border-color: #FFA500;
    animation: borderGlowWarning 2s infinite alternate;
}

.custom-dialog.warning::before {
    background: linear-gradient(45deg, #FFA500, #ffcc00, #FFA500);
}

@keyframes borderGlowWarning {
    0% {
        box-shadow: 
            0 0 40px rgba(255, 165, 0, 0.4),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(255, 165, 0, 0.05);
    }
    100% {
        box-shadow: 
            0 0 60px rgba(255, 165, 0, 0.7),
            0 20px 60px rgba(0, 0, 0, 0.8),
            inset 0 0 80px rgba(255, 165, 0, 0.1);
    }
}

.custom-dialog-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.custom-dialog-message {
    color: var(--text);
    font-size: 1.15rem;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.custom-dialog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.custom-dialog-actions .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-dialog-btn:hover {
    transform: scale(1.05);
}

.custom-dialog-confirm {
    background: var(--danger) !important;
}

.custom-dialog-confirm:hover {
    background: #c23030 !important;
    transform: scale(1.05);
}

.custom-dialog-cancel:hover {
    transform: scale(1.05);
}

/* Toast notifications */
.custom-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--surface);
    padding: 16px 24px;
    border-radius: 12px;
    border: 3px solid var(--primary);
    box-shadow: 
        0 0 30px rgba(88, 101, 242, 0.5),
        0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.custom-toast::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 12px;
    z-index: -1;
    opacity: 0.3;
    filter: blur(8px);
}

.custom-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-toast.error {
    border-color: var(--danger);
    box-shadow: 
        0 0 30px rgba(237, 66, 69, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.6);
}

.custom-toast.error::before {
    background: linear-gradient(90deg, var(--danger), #ff6b6b);
}

.custom-toast.success {
    border-color: var(--secondary);
    box-shadow: 
        0 0 30px rgba(87, 242, 135, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.6);
}

.custom-toast.success::before {
    background: linear-gradient(90deg, var(--secondary), #5affb0);
}

.custom-toast.warning {
    border-color: #FFA500;
    box-shadow: 
        0 0 30px rgba(255, 165, 0, 0.6),
        0 10px 30px rgba(0, 0, 0, 0.6);
}

.custom-toast.warning::before {
    background: linear-gradient(90deg, #FFA500, #ffcc00);
}

.custom-toast-icon {
    font-size: 1.5rem;
}

.custom-toast-message {
    color: var(--text);
    font-size: 1rem;
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background-color: var(--background);
    border-radius: 5px;
    min-height: 40px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Detail Page */
.detail-container {
    background-color: var(--surface);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 40px;
}

.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.detail-header {
    margin-bottom: 30px;
}

.detail-header h2 {
    color: var(--secondary);
    margin-bottom: 10px;
}

.owner-info {
    color: var(--text-muted);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.main-image {
    width: 100%;
    height: 400px;
    background-color: var(--background);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.image-gallery img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

.image-gallery img:hover {
    border-color: var(--primary);
}

.no-image-large {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    color: var(--text-muted);
    border-radius: 10px;
}

.info-section {
    margin-bottom: 30px;
}

.info-section h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.stats-detail {
    background-color: var(--background);
    padding: 20px;
    border-radius: 5px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.users-list {
    max-height: 300px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: var(--background);
    margin-bottom: 10px;
    border-radius: 5px;
}

.user-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Admin Page */
.admin-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.admin-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.admin-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.admin-card h3 {
    color: var(--text);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.admin-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.admin-badge {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--background);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.admin-section {
    background-color: var(--surface);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.admin-section h3 {
    color: var(--secondary);
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background-color: var(--background);
    color: var(--secondary);
}

.admin-table code {
    background-color: var(--background);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9rem;
}

.role-badges {
    display: flex;
    gap: 5px;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    background-color: var(--border);
}

.badge-admin {
    background-color: var(--danger);
}

.badge-super {
    background-color: #FFD700;
    color: #000;
    font-weight: bold;
}

.badge-user {
    background-color: var(--primary);
}

.super-admin-row {
    background-color: rgba(255, 215, 0, 0.05);
    border-left: 3px solid #FFD700;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

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

.stat-card {
    background-color: var(--background);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    color: var(--secondary);
    font-weight: bold;
}

.stat-label {
    color: var(--text-muted);
    margin-top: 10px;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.alert-error {
    background-color: rgba(237, 66, 69, 0.2);
    border-left: 4px solid var(--danger);
}

/* Loading & Empty States */
.loading,
.error {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 60px;
    background-color: var(--surface);
    border-radius: 10px;
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: var(--surface);
    padding: 20px;
    margin-top: 500px;
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
    }

    .search-box {
        margin-left: 0;
        max-width: 100%;
    }

    .detail-content {
        grid-template-columns: 1fr;
    }

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

    .user-info {
        border-left: none;
        padding-left: 0;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }
}

/* Theme Selector Styles */
.modal-large {
    max-width: 700px;
    width: 90%;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px 0;
    max-height: 350px;
    overflow-y: auto;
}

.theme-card {
    background-color: var(--surface);
    border: 3px solid var(--border);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.theme-card.selected {
    border-color: var(--primary);
    background-color: rgba(88, 101, 242, 0.2);
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.5);
}

.theme-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.theme-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.theme-preview {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.theme-preview span {
    width: 30px;
    height: 30px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Approvals Page */
.approvals-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background-color: var(--surface);
    padding: 15px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background-color: var(--background);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background-color: var(--border);
}

.tab-btn.active {
    background-color: var(--primary);
    color: var(--text);
}

.tab-content {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.approval-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.approval-card {
    background-color: var(--surface);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

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

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--background);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-badge.pending {
    background-color: #FEE75C;
    color: #000;
}

.status-badge.approved {
    background-color: var(--secondary);
    color: #000;
}

.status-badge.rejected {
    background-color: var(--danger);
    color: var(--text);
}

.status-badge.co-owner {
    background-color: var(--primary);
    color: var(--text);
}

.status-badge.has-permission {
    background-color: #99AAB5;
    color: var(--text);
}

.shared-item {
    border-left: 3px solid var(--primary);
}

/* Metadata badges para género y tipo */
.clothing-metadata {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.metadata-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    background-color: rgba(88, 101, 242, 0.2);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: var(--text);
    display: inline-block;
}

.clothing-metadata-large {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 12px 0;
}

.metadata-badge-large {
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    background-color: rgba(88, 101, 242, 0.3);
    border: 1px solid rgba(88, 101, 242, 0.5);
    color: var(--text);
    display: inline-block;
    font-weight: 500;
}

.owner-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-style: italic;
}

.pending-count {
    background-color: #FEE75C;
    color: #000;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.approval-info {
    padding: 20px;
}

.approval-info .owner {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.approval-info .description {
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.approval-info .image-count {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.approval-info .approved-by {
    font-size: 0.85rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.approval-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========== GESTIÓN DE PERMISOS ========== */

.modal-permissions {
    max-width: 650px;
    width: 90%;
}

.permissions-section {
    margin-bottom: 25px;
}

.permissions-section h4 {
    color: var(--secondary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.owner-info {
    margin-bottom: 20px;
}

.owner-item {
    background-color: rgba(87, 242, 135, 0.1);
    border-left: 3px solid var(--secondary);
}

.permission-item {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.permission-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.permission-name {
    font-weight: 500;
    color: var(--text);
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex: 1;
}

.badge-owner {
    background-color: var(--secondary);
    color: #000;
    font-weight: bold;
}

.badge-support {
    background-color: var(--primary);
    color: var(--text);
}

.badge-use {
    background-color: #99AAB5;
    color: var(--text);
}

.permission-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.add-permission-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.add-permission-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.add-permission-form input::placeholder {
    color: var(--text-muted);
}

.permissions-list {
    max-height: 300px;
    overflow-y: auto;
}

.no-permissions {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    font-style: italic;
}


/* Tickets */
.tickets-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.tickets-container {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
}

.tickets-container h3, .tickets-container h4 {
    margin-bottom: 15px;
}

.tickets-list {
    display: grid;
    gap: 15px;
}

.ticket-card {
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s;
}

.ticket-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.ticket-card.approved {
    border-left-color: var(--secondary);
}

.ticket-card.denied {
    border-left-color: var(--danger);
}

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

.ticket-header h4 {
    margin: 0;
}

.ticket-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.ticket-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-open {
    background: rgba(87, 242, 135, 0.2);
    color: var(--secondary);
}

.status-approved {
    background: rgba(87, 242, 135, 0.2);
    color: var(--secondary);
}

.status-denied {
    background: rgba(237, 66, 69, 0.2);
    color: var(--danger);
}

/* Ticket Detail */
.ticket-detail-container {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
}

.ticket-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ticket-info-header {
    display: flex;
    justify-content: space-between;
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
}

.ticket-info-header p {
    margin: 5px 0;
}

.ticket-messages {
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
}

.messages-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    scroll-behavior: smooth;
    padding: 10px;
}

.messages-list::-webkit-scrollbar {
    width: 8px;
}

.messages-list::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

.messages-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.message {
    padding: 12px;
    border-radius: 8px;
    max-width: 70%;
}

.message.mine {
    background: var(--primary);
    align-self: flex-end;
}

.message.other {
    background: var(--border);
    align-self: flex-start;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.message-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.message-body {
    word-wrap: break-word;
}

.no-messages {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.ticket-chat {
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
}

.ticket-chat textarea {
    width: 100%;
    padding: 10px;
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    margin: 10px 0;
    resize: vertical;
    font-family: inherit;
}

.ticket-actions {
    background: var(--surface);
    padding: 15px;
    border-radius: 8px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

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

.btn-success:hover {
    background: #46d66f;
}

.ticket-closed {
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    color: var(--text-muted);
}

.btn-block {
    width: 100%;
}

/* Live indicator */
.live-indicator {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--danger);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Admin Logs Styles */
.filters-section {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    font-family: inherit;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.logs-section {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.logs-table th,
.logs-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.logs-table th {
    background: var(--background);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.logs-table tr:hover {
    background: var(--background);
}

.action-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.action-success {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.action-danger {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.action-neutral {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.details-cell {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 200px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-pagination {
    padding: 8px 12px;
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pagination:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-pagination.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-left: 10px;
}

.id-gray {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Presence Indicator */
.presence-indicator {
    display: inline-block;
    margin-left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.presence-indicator.online {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    animation: pulse-online 2s infinite;
}

.presence-indicator.offline {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.status-online {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-offline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

@keyframes pulse-online {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.ticket-messages h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Notifications Bell */
.notifications-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    margin: 0 10px;
    user-select: none;
}

.bell-icon {
    font-size: 1.5rem;
    display: inline-block;
    transition: transform 0.3s;
}

.notifications-bell:hover .bell-icon {
    transform: rotate(15deg);
}

.notifications-bell.has-notifications .bell-icon {
    animation: ring 1s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(15deg); }
    20%, 40% { transform: rotate(-15deg); }
}

.notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    width: 380px;
    max-height: 500px;
    overflow: hidden;
    z-index: 1000;
}

.notifications-header {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    font-size: 1rem;
    margin: 0;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.mark-all-read:hover {
    background-color: rgba(88, 101, 242, 0.1);
}

.notifications-list {
    max-height: 420px;
    overflow-y: auto;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-item {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background-color: rgba(88, 101, 242, 0.1);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.notification-message {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.notification-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notification-link {
    background-color: var(--primary);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    white-space: nowrap;
    align-self: center;
}

.notification-link:hover {
    background-color: var(--primary-dark);
}

.notification-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s;
}

.notification-delete:hover {
    opacity: 1;
    color: var(--danger);
}

.notifications-list::-webkit-scrollbar {
    width: 8px;
}

.notifications-list::-webkit-scrollbar-track {
    background: var(--background);
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Users with Access List */
.user-access-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.user-access-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.user-name {
    font-size: 0.95rem;
}

.user-role {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-role.role-owner {
    background-color: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.user-role.role-coowner {
    background-color: rgba(147, 51, 234, 0.2);
    color: #9333EA;
}

.user-role.role-use {
    background-color: rgba(87, 242, 135, 0.2);
    color: var(--secondary);
}
/* ========== RESPONSIVE DESIGN - MOBILE ========== */

@media (max-width: 768px) {
    /* Contenedor principal */
    .container {
        padding: 10px;
    }

    /* Navegación móvil */
    .navbar {
        padding: 10px 0;
    }

    .nav-brand h1 {
        font-size: 1.2rem;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .nav-links a {
        padding: 10px 8px;
        text-align: center;
        font-size: 0.8rem;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        text-align: center;
    }

    .user-info span {
        font-size: 0.85rem;
    }

    .notifications-bell {
        position: relative;
        margin: 0 auto;
    }

    /* Grids responsivos */
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .users-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Tarjetas de prendas */
    .clothing-card {
        max-width: 100%;
    }

    .clothing-image {
        height: 250px;
    }

    /* Modales móviles */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 15px;
        margin: 10px;
        max-height: 90vh;
    }

    .modal-content h3 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .close {
        font-size: 28px;
        right: 15px;
        top: 10px;
    }

    .modal-large {
        max-width: 95%;
        width: 95%;
    }

    .modal-permissions {
        max-width: 95%;
        width: 95%;
    }

    /* Formularios */
    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 0.9rem;
    }

    .modal-actions {
        flex-direction: column;
        gap: 8px;
        padding-top: 15px;
        margin-top: 15px;
    }

    .modal-actions .btn {
        width: 100%;
        min-width: auto;
    }

    /* Botones */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Header de página */
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .header-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .header-actions .btn {
        width: 100%;
    }

    /* Sección de héroe */
    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Filtros */
    .filters-section {
        padding: 15px;
    }

    .filters-row {
        flex-direction: column;
        gap: 10px;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group label {
        margin-bottom: 5px;
    }

    /* Detalles de prenda */
    .detail-container {
        padding: 15px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .clothing-images {
        margin-bottom: 20px;
    }

    .main-image {
        height: 300px;
    }

    .thumbnail-images {
        gap: 8px;
    }

    .thumbnail-image {
        width: 60px;
        height: 60px;
    }

    /* Información de prenda */
    .clothing-info-detail h1 {
        font-size: 1.5rem;
    }

    .clothing-info-detail .owner {
        font-size: 0.85rem;
    }

    .metadata-badge {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    /* Acciones de prenda */
    .clothing-actions {
        flex-direction: column;
        gap: 8px;
    }

    .clothing-actions .btn {
        width: 100%;
    }

    /* Tickets */
    .tickets-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tab-btn {
        flex: 1 1 45%;
        font-size: 0.85rem;
        padding: 10px;
    }

    .ticket-item {
        padding: 12px;
    }

    /* Mensajes de ticket */
    .messages-container {
        padding: 10px;
    }

    .message {
        padding: 10px;
        max-width: 85%;
    }

    .message-input-area {
        padding: 10px;
    }

    .message-input-area textarea {
        font-size: 0.9rem;
    }

    /* Temas */
    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-height: 400px;
    }

    .theme-card {
        padding: 12px;
    }

    .theme-icon {
        font-size: 2rem;
    }

    .theme-name {
        font-size: 0.85rem;
    }

    /* Diálogos personalizados */
    .custom-dialog {
        width: 95%;
        max-width: 95%;
        padding: 25px;
    }

    .custom-dialog-icon {
        font-size: 2.5rem;
    }

    .custom-dialog-message {
        font-size: 1rem;
    }

    .custom-dialog-actions {
        flex-direction: column;
        gap: 8px;
    }

    .custom-dialog-actions .btn {
        width: 100%;
        min-width: auto;
    }

    /* Toasts */
    .custom-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    /* Admin */
    .admin-card-link {
        padding: 15px;
    }

    .admin-quick-links {
        grid-template-columns: 1fr;
    }

    /* Permisos */
    .permission-item {
        padding: 12px;
    }

    .add-permission-form {
        flex-direction: column;
        gap: 8px;
    }

    .add-permission-form input {
        width: 100%;
    }

    .add-permission-form .btn {
        width: 100%;
    }

    /* Footer */
    footer {
        padding: 20px 10px;
        font-size: 0.85rem;
    }

    /* Tablas */
    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px 6px;
    }

    /* Card actions */
    .card-actions {
        flex-direction: column;
        gap: 6px;
    }

    .card-actions .btn {
        width: 100%;
    }
}

/* Tablets y pantallas medianas */
@media (min-width: 769px) and (max-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .users-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-content {
        width: 85%;
        max-width: 600px;
    }

    .themes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}