/* partner_admin_styles.css */

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

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #021231;
    background: linear-gradient(135deg, #021231 0%, #013049 100%);
    min-height: 100vh;
}

/* Login & Registration Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #021231 0%, #013049 100%);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.login-card h2 {
    color: #021231;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
}

.login-card .subtitle {
    color: #6b7280;
    text-align: center;
    margin-bottom: 30px;
    font-size: 16px;
}

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

.form-group label {
    display: block;
    color: #021231;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #19BFBC;
    box-shadow: 0 0 0 3px rgba(25, 191, 188, 0.1);
}

.form-group small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    margin-top: 6px;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, #19BFBC 0%, #19BFBC 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(25, 191, 188, 0.4);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.login-footer p {
    color: #6b7280;
    font-size: 14px;
}

.login-footer a {
    color: #19BFBC;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #17a8a6;
}

.error .error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #19BFBC;
    text-decoration: none;
    font-weight: 600;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background: #f8f9fc;
}

.dashboard-header {
    background: linear-gradient(135deg, #013049 0%, #021231 100%);
    color: white;
    padding: 35px 0 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    top: -35px;
}

.header-right {
    position: relative;
    top: -8px;
}

.header-left h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    top: 26px;
    left: -24px;
}

.header-left,
.header-center,
.header-right {
  flex: 1;
}

.header-right {
  display: flex;
  justify-content: flex-end;
}

.dashboard-header .header-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

/* center the middle block, push the right block to the edge */
.header-center {
  justify-self: center;
}
.header-right {
  justify-self: end;
}

.partner-id {
    color: #19BFBC;
    font-size: 14px;
    text-align: center;
}

.partner-id strong {
    font-weight: 700;
}

.inpt, .biginpt {
    background: rgba(255,255,255,0.1);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-logout, .btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 2px solid rgba(255,255,255,0.2);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.dashboard-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 30px;
}

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

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.stat-icon.plan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-icon.affiliate {
    background: linear-gradient(135deg, #19BFBC 0%, #17a8a6 100%);
}

.stat-icon.codes {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-content h3 {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #021231;
    margin-bottom: 4px;
}

.stat-label {
    color: #9ca3af;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gray {
    background: #f3f4f6;
    color: #6b7280;
}

.badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.badge-teal {
    background: #ccfbf1;
    color: #0f766e;
}

.badge-gold {
    background: #fef3c7;
    color: #92400e;
}

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    color: #021231;
    font-size: 18px;
    font-weight: 700;
}

.report-count {
    color: #6b7280;
    font-size: 13px;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.affiliate-link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.affiliate-link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    background: #f8f9fc;
    color: #021231;
}

.btn-copy {
    background: #19BFBC;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-copy:hover {
    background: #17a8a6;
    transform: translateY(-1px);
}

.help-text {
    color: #9ca3af;
    font-size: 13px;
    margin-top: 10px;
}

.promo-codes {
    width: 100%;
    /*min-height: 270px;*/
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    background: #f8f9fc;
    color: #021231;
    resize: vertical;
}

/* Upgrade Cards */
.upgrade-card .card-body {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-upgrade {
    flex: 1;
    min-width: 200px;
    background: white;
    border: 2px solid #e5e7eb;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.btn-upgrade:hover {
    border-color: #19BFBC;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(25, 191, 188, 0.15);
}

.upgrade-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #021231;
    margin-bottom: 8px;
}

.upgrade-price {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #19BFBC;
}

.btn-cancel {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.btn-cancel:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Reports Table */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.reports-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 14px;
}

.reports-table thead {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
}

.reports-table th {
    padding: 14px 12px;
    text-align: left;
    color: #021231;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.reports-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
}

.reports-table tbody tr:hover {
    background: #f8f9fc;
}

.reports-table td {
    padding: 12px;
    color: #4b5563;
}

.promo-code {
    display: inline-block;
    padding: 3px 8px;
    background: #f3f4f6;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #021231;
}

.stage-cell, .tws-cell {
    font-weight: 600;
    color: #021231;
}

.score-cell {
    text-align: center;
    font-weight: 500;
}

.action-cell {
    text-align: center;
}

.download-link {
    display: inline-block;
    padding: 6px 12px;
    background: #19BFBC;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

.download-link:hover {
    background: #17a8a6;
    transform: scale(1.1);
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #9ca3af;
    font-style: italic;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    z-index: 1000;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    color: #021231;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-left h1 {
      top: 0px;
      left: 0px;
    }

    .login-card {
        padding: 30px 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
    }
    
    .table-container {
        font-size: 12px;
    }
    
    .reports-table th,
    .reports-table td {
        padding: 8px 6px;
    }
}

/* ---- Combined links card ---- */
.links-card .card-body       { display: flex; flex-direction: column; gap: 22px; }

.link-row label              { font-weight: 600; color: #021231; font-size: 13px; }

.link-controls               { display: flex; gap: 10px; margin-top: 6px; }

.link-controls input         { flex: 1; padding: 10px 14px; background:#f8f9fc;
                                border: 2px solid #e5e7eb; border-radius: 10px;
                                font-family: 'Consolas','Monaco',monospace; font-size: 11px;}

.link-row .btn-copy          { padding: 10px 20px; }

.link-row .meta              { color:#6b7280; font-size:12px; margin-top:6px; }

.btn-request                 { margin-top:10px; width:100%; padding:12px 24px;
                                background:#013049; color:#fff; border:none;
                                border-radius:10px; font-size:14px; font-weight:600;
                                cursor:pointer; transition:all .3s ease; }

.btn-request:hover           { background:#021231; transform:translateY(-1px); }

/* keeps card height reasonable on small screens */
@media(max-width:600px){
  .links-card .card-body { gap:16px; }
}

/* center the dashboard title & partner ID */
.header-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 4px;
}

/* space things nicely on the left */
.header-left {
  display: flex;
  align-items: center;
  column-gap: 12px;
}

/* optional: tweak logo font-size to match partner title */
.site-logo {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

/* Footer */
.dashboard-footer {
  background: #021231;
  color: #f3f4f6;
  padding: 40px 0;
}
.dashboard-footer .footer-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  gap: 10px;
}
.dashboard-footer a {
  color: #19BFBC;
  text-decoration: none;
  font-weight: 600;
}
.dashboard-footer a:hover {
  text-decoration: underline;
}

.btn-export {text-decoration: none;}


/**/

.popover{position:absolute; right:120px; top:48px; background:#fff;border:1px solid #e6e6e6;border-radius:10px;padding:10px;box-shadow:0 10px 30px rgba(0,0,0,.06);min-width:280px;}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;z-index:1000;}
.modal-card{background:#fff;border-radius:12px;min-width:320px;max-width:520px;padding:16px;box-shadow:0 10px 30px rgba(0,0,0,.15);}
.coaches td small{opacity:.7}
.mini-btn{border:0;background:#f3f3f3;padding:4px 6px;border-radius:8px;cursor:pointer}
.mini-btn.unassign{color:#b00020}
.assigned-done{
  color: green;
  font-weight: bold;
  font-size: 24px;
}
.plan-switcher{display:inline-block;position:relative;margin-right:8px;}

#coach-table {
    /*border: 1px solid #19BFBC;*/
    border-collapse: collapse;
    font-size: 13px;
}

#coach-table th {
    padding: 5px;
}
#coach-table td {
    text-align:center;
}
#coach-add, #coach-save, .biginpt, #assign-confirm, #notes-save {
    width:49%;
    height: 52px;
    border-radius: 30px;
}

.editable-cell[data-empty="1"]::after { content: "✏️"; display: block; font-size: 12px; opacity: .6; margin-top: 4px; }


.tag-cell .tag { display:inline-block; font-size:12px;}
.tag-cell .tag.is-editing { outline:2px solid #19BFBC; background:#f6fffe; min-height:20px; min-width:30px; }