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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e0e0e0;
}

.container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.container.dashboard {
    max-width: 700px;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.logo img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
}

h1 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.subtitle {
    text-align: center;
    margin-bottom: 32px;
    color: #8892b0;
    font-size: 14px;
}

.tabs {
    display: flex;
    margin-bottom: 24px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    color: #8892b0;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tab.active {
    color: #64ffda;
    border-bottom-color: #64ffda;
}

.tab:hover {
    color: #64ffda;
}

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

label {
    display: block;
    margin-bottom: 6px;
    color: #8892b0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: border-color 0.3s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: #64ffda;
    background: rgba(255, 255, 255, 0.08);
}

input::placeholder {
    color: #5a6a8a;
}

.btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #64ffda 0%, #00bfa5 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(100, 255, 218, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    width: auto;
    padding: 8px 20px;
    font-size: 13px;
}

.message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    display: none;
}

.message.success {
    display: block;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
}

.message.error {
    display: block;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
}

.reset-step {
    display: none;
}

.reset-step.active {
    display: block;
}

/* Dashboard styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-header h2 {
    color: #fff;
    font-size: 20px;
}

.logout-btn {
    background: rgba(255, 100, 100, 0.15);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 100, 100, 0.25);
}

.payment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

.payment-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-card .amount {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.payment-card .meta {
    font-size: 12px;
    color: #8892b0;
    margin-top: 4px;
}

.no-payments {
    text-align: center;
    color: #8892b0;
    padding: 24px;
}

/* Enterprise license dashboard */
.license-section-header {
    margin-top: 28px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.license-section-header h2 {
    font-size: 20px;
    color: #fff;
}

.license-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
}

.license-card .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.license-card .app {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.license-card .seats {
    font-size: 13px;
    color: #64ffda;
    font-weight: 600;
}

.license-card .meta {
    font-size: 12px;
    color: #8892b0;
    margin-top: 4px;
}

.license-key-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.license-key {
    flex: 1;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    color: #64ffda;
    background: rgba(100, 255, 218, 0.08);
    border: 1px solid rgba(100, 255, 218, 0.25);
    border-radius: 8px;
    padding: 8px 12px;
    user-select: all;
    overflow-wrap: anywhere;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.device-list {
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

.device-list-title {
    font-size: 12px;
    font-weight: 700;
    color: #8892b0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.device-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #e0e0e0;
    padding: 5px 0;
}

.device-row .serial {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12px;
}

.device-remove {
    background: none;
    border: none;
    color: #ff6464;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
}

.device-remove:hover {
    background: rgba(255, 100, 100, 0.15);
}

/* Enterprise shop */
.enterprise-shop-header {
    margin-top: 28px;
    margin-bottom: 4px;
}

.enterprise-shop-header h2 {
    font-size: 20px;
    color: #fff;
}

.seats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.seats-row label {
    font-size: 13px;
    color: #e0e0e0;
}

.seats-input {
    width: 72px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    padding: 8px 10px;
    text-align: center;
}

.auth-view, .dashboard-view, .shop-view, .loading-view {
    display: none;
}

.auth-view.active, .dashboard-view.active, .shop-view.active, .loading-view.active {
    display: block;
    height: 100vh;
}

.loading-view.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Shop styles */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.price-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.internal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.internal-grid .price-icon-container {
    grid-column: 2;
    height: 100%;
    margin: 0 auto;
}

.internal-grid .description {
    grid-column: 1;
}

.internal-grid img.price-icon {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.price-card .price-icon {
    font-size: 32px;
    margin-bottom: 4px;
}

.price-card .price-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.price-card .price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #64ffda;
}

.price-card .price-meta {
    font-size: 12px;
    color: #8892b0;
}

.price-card .buy-btn {
    align-self: flex-start;
    padding: 10px 24px;
    background: linear-gradient(135deg, #64ffda 0%, #00bfa5 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.price-card .buy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(100, 255, 218, 0.3);
}

.price-card .buy-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #8892b0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

.shop-header h2 {
    color: #fff;
    font-size: 20px;
}

.verify-warning {
    background: rgba(255, 152, 0, 0.15);
    border: 1px solid rgba(255, 152, 0, 0.4);
    color: #ffb74d;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.back-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #8892b0;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.plans-details {
    margin-top: 8px;
}

.plans-summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #64ffda;
    padding: 6px 12px;
    background: rgba(100, 255, 218, 0.08);
    border-radius: 6px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.plans-summary::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.2s;
}

.plans-details[open] > .plans-summary::before {
    transform: rotate(90deg);
}

.plans-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.plan-item {
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
}

.plan-info .plan-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.plan-info .plan-price {
    font-size: 13px;
    color: #64ffda;
    font-weight: 600;
}

.plan-item .buy-btn {
    width: auto;
    padding: 6px 16px;
    font-size: 12px;
}

.purchased-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(100, 255, 218, 0.15);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    align-self: flex-start;
}

.shop-loading {
    text-align: center;
    color: #8892b0;
    padding: 24px;
}

.shop-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid rgba(100, 255, 218, 0.25);
    border-top-color: #64ffda;
    border-radius: 50%;
    vertical-align: -2px;
    animation: shop-spin 0.8s linear infinite;
}

@keyframes shop-spin {
    to { transform: rotate(360deg); }
}

.info-box {
    background: rgba(255, 200, 50, 0.1);
    border: 1px solid rgba(255, 200, 50, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #ffc832;
    line-height: 1.5;
}

.info-box strong {
    color: #fff;
    font-weight: 700;
}

.price-card.highlighted {
    border-color: #64ffda;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.3);
}

.sign-in-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 200, 50, 0.15);
    border: 1px solid rgba(255, 200, 50, 0.4);
    border-radius: 12px;
    padding: 16px 24px;
    color: #ffc832;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    display: none;
}

.sign-in-notification.visible {
    display: block;
}

.sign-in-notification .notif-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: #ffc832;
    font-size: 18px;
    cursor: pointer;
}

.product-features {
    margin-top: 8px;
}

.product-features summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #64ffda;
    padding: 6px 12px;
    background: rgba(100, 255, 218, 0.08);
    border-radius: 6px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-features summary::before {
    content: '▶';
    display: inline-block;
    transition: transform 0.2s;
}

.product-features[open] > summary::before {
    transform: rotate(90deg);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding-left: 20px;
}

.feature-list li {
    font-size: 13px;
    color: white;
    list-style: none;
    padding: 4px 0;
}

.feature-list li::before {
    content: '•';
    color: white;
    margin-right: 8px;
}

/* Verify Email Dialog */
.verify-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.verify-dialog-overlay.visible {
    display: flex;
}

.verify-dialog {
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.verify-dialog h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.verify-dialog .close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #8892b0;
    font-size: 24px;
    cursor: pointer;
}

.verify-dialog .close-btn:hover {
    color: #fff;
}

.verify-dialog .dialog-form-group {
    margin-bottom: 16px;
}

.verify-dialog .dialog-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #8892b0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verify-dialog .dialog-form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
}

.verify-dialog .dialog-form-group input:focus {
    outline: none;
    border-color: #64ffda;
}

.verify-dialog .dialog-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #64ffda 0%, #00bfa5 100%);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.verify-dialog .dialog-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: #8892b0;
    cursor: not-allowed;
}

.verify-dialog .dialog-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    display: none;
}

.verify-dialog .dialog-message.success {
    display: block;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
}

.verify-dialog .dialog-message.error {
    display: block;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.verify-dialog .info-box {
    background: rgba(100, 255, 218, 0.08);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
}
