/* Main styles for Gestor de Prompts */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #0d1117;
    color: #c9d1d9;
}

/* Sidebar Styles */
.sidebar {
    min-height: 100vh;
    background-color: #1e1e1e;
    padding: 0;
    border-right: 1px solid #333;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
}

.sidebar-header .brand-icon {
    width: 24px;
    height: 24px;
    background-color: #007acc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.sidebar-header .brand-text {
    color: #cccccc;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-section {
    padding: 8px 0;
}

.sidebar .nav-link {
    color: #cccccc;
    padding: 8px 16px;
    border-radius: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

.sidebar .nav-link:hover {
    background-color: #2d2d2d;
    color: #ffffff;
}

.sidebar .nav-link.active {
    background-color: #0e4b82;
    color: #ffffff;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 8px;
    font-size: 14px;
    opacity: 0.8;
}

.user-section {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid #333;
}

.user-info {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 8px;
}

.main-content {
    margin-left: 0;
    padding: 20px;
    background-color: #0d1117;
    color: #c9d1d9;
}

/* Dark theme overrides for Bootstrap components */
.btn-primary {
    background-color: #238636;
    border-color: #238636;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2ea043;
    border-color: #2ea043;
}

.btn-outline-primary {
    color: #58a6ff;
    border-color: #58a6ff;
}

.btn-outline-primary:hover {
    background-color: #58a6ff;
    border-color: #58a6ff;
    color: #ffffff;
}

.btn-outline-secondary {
    color: #8b949e;
    border-color: #30363d;
    background-color: #21262d;
}

.btn-outline-secondary:hover {
    background-color: #30363d;
    border-color: #8b949e;
    color: #f0f6fc;
}

.btn-outline-success {
    color: #4ac26b;
    border-color: #238636;
}

.btn-outline-success:hover {
    background-color: #238636;
    border-color: #238636;
    color: #ffffff;
}

.btn-outline-danger {
    color: #ff7b72;
    border-color: #f85149;
}

.btn-outline-danger:hover {
    background-color: #f85149;
    border-color: #f85149;
    color: #ffffff;
}

.btn-outline-warning {
    color: #e3b341;
    border-color: #d29922;
}

.btn-outline-warning:hover {
    background-color: #d29922;
    border-color: #d29922;
    color: #000000;
}

.form-control {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

.form-control:focus {
    background-color: #0d1117;
    border-color: #58a6ff;
    color: #c9d1d9;
    box-shadow: 0 0 0 0.25rem rgba(88, 166, 255, 0.25);
}

.form-control::placeholder {
    color: #8b949e;
}

.alert {
    border: 1px solid;
}

.alert-success {
    background-color: #0f2419;
    border-color: #2ea043;
    color: #4ac26b;
}

.alert-danger {
    background-color: #2d1117;
    border-color: #f85149;
    color: #ff7b72;
}

.alert-warning {
    background-color: #2d2117;
    border-color: #d29922;
    color: #e3b341;
}

.alert-info {
    background-color: #0c2d6b;
    border-color: #58a6ff;
    color: #79c0ff;
}

.card {
    background-color: #161b22;
    border-color: #30363d;
    color: #c9d1d9;
}

.card-header {
    background-color: #21262d;
    border-bottom-color: #30363d;
}

.card-footer {
    background-color: #21262d;
    border-top-color: #30363d;
}

.badge {
    color: #ffffff;
}

.bg-success {
    background-color: #238636 !important;
}

.bg-secondary {
    background-color: #6e7681 !important;
}

.bg-light {
    background-color: #30363d !important;
    color: #c9d1d9 !important;
}

.text-muted {
    color: #8b949e !important;
}

.text-dark {
    color: #c9d1d9 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #f0f6fc;
}

/* Dark theme for tables */
.table {
    color: #c9d1d9;
    border-color: #30363d;
}

.table th {
    background-color: #21262d;
    border-color: #30363d;
    color: #f0f6fc;
    font-weight: 600;
}

.table td {
    border-color: #30363d;
    background-color: #0d1117;
}

.table tbody tr:hover {
    background-color: #161b22;
}

.table-responsive {
    border-radius: 6px;
    overflow: hidden;
}

/* Badge adjustments for dark theme */
.badge.bg-warning {
    background-color: #d29922 !important;
    color: #000000;
}

.badge.bg-info {
    background-color: #58a6ff !important;
    color: #ffffff;
}

/* Button group styling */
.btn-group .btn {
    margin-right: 2px;
}

.btn-sm {
    font-size: 0.75rem;
}

/* Mobile and responsive styles */
@media (min-width: 768px) {
    .main-content {
        margin-left: 250px;
    }
}

.sidebar-mobile {
    background-color: #1e1e1e;
}

.sidebar-mobile .navbar-brand {
    color: #cccccc;
}

.sidebar-mobile .nav-link {
    color: #cccccc;
}

.sidebar-mobile .nav-link:hover {
    color: #ffffff;
}

.navbar-toggler {
    border-color: #30363d;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* Utility classes */
.empty-state {
    color: #999 !important;
}

.no-margin {
    margin: 0 !important;
}

.inline-form {
    display: inline !important;
}

.hidden-field {
    display: none !important;
}

.sidebar-fixed {
    width: 250px;
    z-index: 1000;
}

/* Unified List Styles */
.item-list {
    color: #cccccc;
    border-radius: 8px;
    overflow: hidden;
}

.item-list.with-header {
    margin-top: 24px;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    text-decoration: none;
    color: #cccccc;
    transition: background-color 0.2s ease;
}

.list-item:hover {
    background-color: #2d2d2d;
    color: #ffffff;
    text-decoration: none;
}

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

.item-title {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    margin-right: 16px;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.item-date {
    color: #999;
    font-size: 12px;
    min-width: 60px;
    text-align: right;
}

.item-author {
    color: #999;
    font-size: 12px;
    margin-right: 8px;
}

.item-description {
    color: #999;
    font-size: 12px;
    margin-left: 16px;
    margin-right: 16px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges and Tags */
.badge-base {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.tag-group {
    display: flex;
    gap: 6px;
}

.tag-item {
    background-color: #0e4b82;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* List Headers */
.list-header {
    background-color: #21262d;
    padding: 16px;
    border-bottom: 1px solid #333;
    color: #f0f6fc;
    font-weight: 600;
}

/* Status and Permission Badges */
.status-badge,
.badge-base {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge {
    margin-right: 12px;
}

.status-public {
    background-color: #28a745;
    color: #ffffff;
}

.status-shared {
    background-color: #17a2b8;
    color: #ffffff;
}

.status-private {
    background-color: #6c757d;
    color: #ffffff;
}

.permission-badge {
    margin-right: 12px;
}

.permission-read {
    background-color: #58a6ff;
    color: #ffffff;
}

.permission-write {
    background-color: #28a745;
    color: #ffffff;
}

.role-admin {
    background-color: #d29922;
    color: #000000;
}

.role-member {
    background-color: #58a6ff;
    color: #ffffff;
}

.members-badge {
    background-color: #58a6ff;
    color: #ffffff;
}

/* Legacy class compatibility - apply unified styles */
.prompt-list,
.team-list,
.member-list {
    color: #cccccc;
    overflow: hidden;
}

.member-list {
    margin-top: 24px;
}

.prompt-item,
.team-item,
.member-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    text-decoration: none;
    color: #cccccc;
    transition: background-color 0.2s ease;
}

.prompt-item:hover,
.team-item:hover,
.member-item:hover {
    background-color: #2d2d2d;
    color: #ffffff;
    text-decoration: none;
}

.prompt-item:last-child,
.team-item:last-child,
.member-item:last-child {
    border-bottom: none;
}

.prompt-title,
.team-title {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    margin-right: 16px;
}

.prompt-meta,
.team-meta,
.member-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.prompt-author,
.team-creator,
.member-added-by {
    color: #999;
    font-size: 12px;
    margin-right: 8px;
}

.prompt-date,
.team-date,
.member-date {
    color: #999;
    font-size: 12px;
    min-width: 60px;
    text-align: right;
}

.prompt-tags {
    display: flex;
    gap: 6px;
}

.prompt-tag {
    background-color: #0e4b82;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.team-description {
    color: #999;
    font-size: 12px;
    margin-left: 16px;
    margin-right: 16px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-members-badge {
    background-color: #58a6ff;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.member-role {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.members-header {
    background-color: #21262d;
    padding: 16px;
    border-bottom: 1px solid #333;
    color: #f0f6fc;
    font-weight: 600;
}

.prompt-status-indicator {
    margin-right: 12px;
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-right: 12px;
}