@font-face {
    font-family: "IBM Plex Sans";
    src: url("/static/fonts/IBMPlexSans-Variable.ttf") format("truetype");
    font-style: normal;
    font-weight: 100 700;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("/static/fonts/IBMPlexSans-Italic-Variable.ttf") format("truetype");
    font-style: italic;
    font-weight: 100 700;
}

html,
body {
    font-family: "IBM Plex Sans", sans-serif;
    margin: 0;
    padding: 0;
    background: #141414;
    min-height: 100vh;
    color: #ffffff;
    font-size: 1rem;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5rem;
    background: #1a1a1a;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #262626;
    width: 100%;
    box-sizing: border-box;
}

.header .logo {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
}

.header .logo a {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: opacity 0.2s ease;
}

.header .logo a:hover {
    opacity: 0.8;
}

.header nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
}

.header .user-info {
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content {
    padding: 0;
    position: relative;
    z-index: 1;
    background: #141414;
    min-height: calc(100vh - 4rem);
}

.container {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 8.125rem 1rem 3.125rem 1rem;
    box-sizing: border-box;
}

.welcome-text {
    font-size: 1rem;
    font-weight: 400;
    color: #a6a6a6;
    text-align: center;
    margin: 1.25rem 0;
    padding: 0.9375rem 1.25rem;
    background: #1a1a1a;
    border-radius: 0.5rem;
    border: 1px solid #262626;
}

.logo-icon {
    height: 24px;
    width: auto;
    transition: opacity 0.2s ease;
}

/* Organization grid styling (logged in home page) */
.organization-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0;
}

.organization-card {
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 0.5rem;
    padding: 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-width: 22rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    overflow: hidden;
}

.organization-card:hover {
    border-color: #383838;
}

.organization-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    gap: 1.1875rem;
}

.organization-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.organization-card-top {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.organization-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 0 0;
    min-width: 0;
}

.organization-name {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1;
    color: #ffffff;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.organization-publisher {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #a6a6a6;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.organization-description {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    color: #a6a6a6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Wizard Styles */
.wizard-container {
    max-width: 50rem;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.wizard-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.wizard-header h1 {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 2rem;
    color: #2d2d2a;
    margin-bottom: 0.625rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.wizard-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding: 1.875rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 0.9375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-section h2 {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1.5rem;
    color: #2d2d2a;
    margin-bottom: 0.625rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #eb8643;
    padding-bottom: 0.625rem;
}

.form-section p {
    color: #666;
    margin-bottom: 1.875rem;
    font-size: 1rem;
}

.form-actions {
    text-align: center;
    margin-top: 2.5rem;
    padding-top: 1.875rem;
    border-top: 1px solid #e0e0e0;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5625rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2d2d2a;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: "IBM Plex Sans", sans-serif;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #eb8643;
    box-shadow: 0 0 0 3px rgba(235, 134, 67, 0.1);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-help {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.3125rem;
}

/* File Upload Styles */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-preview {
    border: 2px dashed #e0e0e0;
    border-radius: 0.5rem;
    padding: 1.25rem;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    min-height: 7.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-preview:hover {
    border-color: #eb8643;
    background: #fef7f0;
}

.upload-placeholder {
    color: #666;
}

.upload-placeholder span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.625rem;
}

/* Navigation Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: "IBM Plex Sans", sans-serif;
}

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

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-0.125rem);
}

.btn-success {
    background: #4caf50;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    background: #45a049;
    transform: translateY(-0.125rem);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid #383838;
}

.btn-outline:hover {
    background: #262626;
    border-color: #404040;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 2.5rem;
}

.loading-spinner {
    margin-bottom: 1.25rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #eb8643;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading-state h3 {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1.5rem;
    color: #2d2d2a;
    margin-bottom: 0.625rem;
}

.loading-state p {
    color: #666;
    font-size: 1rem;
}

/* Success State */
.success-state {
    text-align: center;
    padding: 2.5rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3);
}

.success-state h3 {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1.75rem;
    color: #2d2d2a;
    margin-bottom: 0.625rem;
}

.success-state p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.875rem;
}

.success-details {
    background: #f9f9f9;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.875rem;
    border: 1px solid #e0e0e0;
}

.detail-item {
    margin-bottom: 0.625rem;
    font-size: 1rem;
}

.detail-item strong {
    color: #2d2d2a;
    font-weight: 600;
}

.success-actions {
    display: flex;
    gap: 0.9375rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 2.5rem;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(231, 76, 60, 0.3);
}

.error-state h3 {
    font-family: "IBM Plex Sans", sans-serif;
    font-size: 1.75rem;
    color: #2d2d2a;
    margin-bottom: 0.625rem;
}

.error-state p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.875rem;
}

.error-actions {
    display: flex;
    gap: 0.9375rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Product Cards for Logged Out Users */
.products-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0;
}

.product-card-public {
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 0.5rem;
    padding: 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 15.75rem;
    min-width: 22rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    overflow: hidden;
}

.product-card-public:hover {
    border-color: #383838;
}

.product-card-public-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem 1.5rem 0 24px;
    gap: 1.1875rem;
}

.product-card-public-header {
    display: flex;
    flex-direction: column;
    gap: 1.1875rem;
    flex: 1 0 0;
    min-height: 0;
}

.product-card-public-top {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.product-card-public-icon {
    flex-shrink: 0;
}

.product-card-public-icon img {
    width: 48px;
    height: 48px;
    border-radius: 0.25rem;
    object-fit: cover;
    border: 1px solid #262626;
}

.product-card-public-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 0 0;
    min-width: 0;
}

.product-card-public-name {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1;
    color: #ffffff;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.product-card-public-publisher {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #a6a6a6;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.product-card-public-description {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    color: #a6a6a6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-card-public-footer {
    border-top: 1px solid #262626;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: auto;
}

.product-card-public-price {
    background: #262626;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1;
    color: #ffffff;
    text-align: left;
    width: fit-content;
}

/* Organization Page Styles */
.organization-header-card {
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.organization-header-content {
    margin-bottom: 1.5rem;
}

.organization-title {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 2rem;
    line-height: 3rem;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.organization-description-text {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.5rem;
    color: #a6a6a6;
    margin: 0 0 16px 0;
}

.organization-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.organization-slug {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: #a6a6a6;
}

.organization-status {
    padding: 0.25rem 8px;
    border-radius: 0.25rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-active {
    background: #1a3a1a;
    color: #4caf50;
    border: 1px solid #2d5a2d;
}

.status-inactive {
    background: #3a1a1a;
    color: #f44336;
    border: 1px solid #5a2d2d;
}

.organization-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.products-section {
    margin-top: 2rem;
}

.products-section-title {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 2.25rem;
    color: #ffffff;
    margin: 0 0 24px 0;
}

/* Product Card for Organization Page (logged in view) */
.product-card {
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.product-name {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1;
    color: #ffffff;
    margin: 0;
}

.product-status {
    padding: 0.25rem 8px;
    border-radius: 0.25rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.product-description {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    color: #a6a6a6;
    margin-bottom: 0.5rem;
}

.product-meta {
    margin-bottom: 1rem;
}

.product-slug {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: #a6a6a6;
    margin-bottom: 0.5rem;
}

.product-licensing {
    display: flex;
    gap: 0.75rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    color: #a6a6a6;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.product-buttons {
    margin-bottom: 0.5rem;
}

.product-purchase-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.product-price {
    background: #262626;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1;
    color: #ffffff;
}

.product-admin-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

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

.btn-danger:hover {
    background: #b71c1c;
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #1a1a1a;
    border: 1px solid #262626;
    border-radius: 0.5rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 500;
    font-size: 1.25rem;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #a6a6a6;
    margin: 0 0 24px 0;
}

.admin-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Test Warning Banner */
.content > .test-warning {
    background: #dc2626;
    color: #ffffff;
    padding: 1.5rem 2rem;
    text-align: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 100;
    border-bottom: 3px solid #991b1b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0;
}

.content > .test-warning p {
    margin: 0;
    padding: 0;
    font-family: "IBM Plex Sans", sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wizard-container {
        padding: 1.25rem;
        margin: 0.625rem;
    }

    .success-actions,
    .error-actions {
        flex-direction: column;
    }

    .test-warning {
        padding: 1rem 1.5rem;
    }

    .test-warning p {
        font-size: 1rem;
    }
}
