/* ==========================================================================
   SMRT Dashboard Styles
   ========================================================================== */

.smrt-dash-wrap {
    display: flex;
    flex-direction: column;
    gap: 32px;
    color: var(--smrt-text);
    font-family: var(--smrt-font-sans);
}

/* Header */
.smrt-dash-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--smrt-text);
}
.smrt-dash-header .smrt-highlight {
    background: var(--smrt-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.smrt-dash-header p {
    color: var(--smrt-text-muted);
    font-size: 16px;
    margin: 0;
}

/* Grids */
.smrt-dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .smrt-dash-grid {
        grid-template-columns: 1fr;
    }
}

/* Cards (Glassmorphism) */
.smrt-dash-card {
    background: rgba(25, 25, 35, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}
.smrt-dash-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(206, 5, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.smrt-dash-card:hover::before {
    opacity: 1;
}
.smrt-dash-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: var(--smrt-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

/* Active Plans List */
.smrt-plan-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}
.smrt-plan-list li {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
}
.smrt-plan-list li:last-child {
    margin-bottom: 0;
}
.smrt-plan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.smrt-plan-name {
    font-weight: 600;
    color: var(--smrt-accent);
    font-size: 15px;
}
.smrt-plan-expires {
    font-size: 13px;
    color: var(--smrt-text-muted);
}

/* Buttons */
.smrt-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}
.smrt-btn-primary {
    background: var(--smrt-gradient);
    color: #fff !important;
    width: 100%;
}
.smrt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(206, 5, 246, 0.3);
}

/* Quick Actions Grid */
.smrt-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.smrt-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--smrt-text) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.smrt-action-item:hover {
    background: rgba(206, 5, 246, 0.1);
    border-color: rgba(206, 5, 246, 0.3);
    transform: translateY(-2px);
}
.smrt-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--smrt-accent);
    transition: all 0.2s ease;
}
.smrt-action-item:hover .smrt-icon-wrap {
    background: var(--smrt-gradient);
    color: #fff;
}
.smrt-action-label {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* Recent Orders Table */
.smrt-card-orders {
    grid-column: 1 / -1;
}
.smrt-table-wrap {
    overflow-x: auto;
    margin-top: -4px;
}
.smrt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}
.smrt-table, .smrt-table tbody, .smrt-table tr, .smrt-table th, .smrt-table td {
    background: transparent !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}
.smrt-table th {
    padding: 12px 16px 16px 16px !important;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.smrt-table td {
    padding: 16px !important;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
.smrt-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
}
.smrt-table th {
    color: var(--smrt-text-muted) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}
.smrt-table td {
    color: var(--smrt-text) !important;
}
.smrt-table tr:last-child td {
    border-bottom: none !important;
}
.smrt-table a {
    color: var(--smrt-accent);
    text-decoration: none;
    font-weight: 500;
}
.smrt-table a:hover {
    text-decoration: underline;
}

/* Status Badges */
.smrt-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}
.smrt-status-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}
.smrt-status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}
.smrt-status-error, .smrt-status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* Orders Footer */
.smrt-orders-footer {
    margin-top: 16px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}
.smrt-text-link {
    color: var(--smrt-text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.smrt-text-link:hover {
    color: var(--smrt-accent);
}

/* Utils */
.smrt-muted {
    color: var(--smrt-text-muted);
}

/* ==========================================================================
   Universal Form Framework
   ========================================================================== */
.smrt-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.smrt-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 600px) {
    .smrt-form-row {
        grid-template-columns: 1fr;
    }
}

.smrt-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px; /* Fallback if not inside .smrt-form */
}

.smrt-form .smrt-form-group {
    margin-bottom: 0;
}

.smrt-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--smrt-text);
    letter-spacing: 0.3px;
}

.smrt-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.smrt-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--smrt-accent);
    box-shadow: 0 0 0 2px rgba(206, 5, 246, 0.2);
}

.smrt-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Overriding PMPro form elements to inherit the same style */
.pmpro_checkout-field input[type="text"],
.pmpro_checkout-field input[type="email"],
.pmpro_checkout-field input[type="password"] {
    width: 100% !important;
    padding: 14px 16px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-family: inherit !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.pmpro_checkout-field input[type="text"]:focus,
.pmpro_checkout-field input[type="email"]:focus,
.pmpro_checkout-field input[type="password"]:focus {
    outline: none !important;
    border-color: var(--smrt-accent) !important;
    box-shadow: 0 0 0 2px rgba(206, 5, 246, 0.2) !important;
}

.pmpro_checkout-field label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--smrt-text) !important;
}
