/*
============================================================
PANCHU AI COMPANY SUBSCRIPTION - FULL STYLESHEET
Version: 4.0 (Subscription Focused)
============================================================
*/

/* --- 1. GENERAL & SUBSCRIPTION FORM STYLES --- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.plan-card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

    .plan-card h3 {
        margin-top: 0;
    }

    .plan-card .price {
        font-size: 2em;
        font-weight: bold;
    }

        .plan-card .price span {
            font-size: 0.5em;
            font-weight: normal;
            color: #777;
        }

.btn-subscribe {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

    .btn-subscribe:hover {
        background: #005a87;
    }

.billing-cycle-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

    .billing-cycle-switch .switch {
        position: relative;
        display: inline-block;
        width: 60px;
        height: 34px;
        margin: 0 10px;
    }

        .billing-cycle-switch .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

    .billing-cycle-switch .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: .4s;
    }

        .billing-cycle-switch .slider.round {
            border-radius: 34px;
        }

            .billing-cycle-switch .slider.round:before {
                position: absolute;
                content: '';
                height: 26px;
                width: 26px;
                left: 4px;
                bottom: 4px;
                background-color: white;
                transition: .4s;
                border-radius: 50%;
            }

    .billing-cycle-switch input:checked + .slider {
        background-color: #ffd700;
    }

        .billing-cycle-switch input:checked + .slider:before {
            transform: translateX(26px);
        }

#company-subscription-message {
    margin-top: 20px;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
}

    #company-subscription-message.error {
        background-color: #f2dede;
        color: #a94442;
    }

/* --- 2. DASHBOARD V2 GENERAL LAYOUT --- */
#company-dashboard-v2 {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #1e1e1e;
    color: #e0e0e0;
    border-radius: 12px;
    min-height: 70vh;
    overflow: hidden;
    border: 1px solid #444;
}

.dashboard-sidebar {
    width: 240px;
    background-color: #1a1a1a;
    padding: 20px 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-profile {
    text-align: center;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.sidebar-profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffd700;
    margin-bottom: 10px;
}

.sidebar-profile-name {
    font-weight: bold;
    color: #fff;
    display: block;
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .sidebar-nav li a {
        display: flex;
        align-items: center;
        padding: 15px 25px;
        color: #ccc;
        text-decoration: none;
        transition: all 0.3s ease;
        border-left: 3px solid transparent;
    }

        .sidebar-nav li a:hover {
            background-color: #2c2c2c;
            color: #fff;
        }

        .sidebar-nav li a.active {
            color: #ffd700;
            border-left-color: #ffd700;
            background-color: #2a2a2a;
            font-weight: bold;
        }

        .sidebar-nav li a i {
            margin-right: 15px;
            width: 20px;
            text-align: center;
        }

.dashboard-content {
    flex-grow: 1;
    padding: 30px 40px;
    position: relative;
    background-color: #1e1e1e;
}

.dashboard-tab-content {
    display: none;
}

    .dashboard-tab-content.active {
        display: block;
        animation: fadeIn 0.5s;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-content h2 {
    color: #ffd700;
    margin-top: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

    .dashboard-content h2 i {
        margin-right: 10px;
    }

/* --- 3. ENHANCED SUBSCRIPTION DISPLAY STYLES --- */
.subscription-status-card {
    background: linear-gradient(145deg, #2d2d2d, #242424);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

    .subscription-status-card .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .subscription-status-card .plan-name {
        font-size: 1.8em;
        font-weight: 300;
        color: #fff;
        margin: 0;
    }

.status-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .status-badge.status-active {
        background-color: rgba(39, 174, 96, 0.2);
        color: #27ae60;
        border: 1px solid #27ae60;
    }

    .status-badge.status-paused {
        background-color: rgba(243, 156, 18, 0.2);
        color: #f39c12;
        border: 1px solid #f39c12;
    }

    .status-badge.status-expired {
        background-color: rgba(231, 76, 60, 0.2);
        color: #e74c3c;
        border: 1px solid #e74c3c;
    }

.time-remaining {
    font-size: 1.1em;
    color: #ccc;
    text-align: center;
    margin-bottom: 15px;
}

.subscription-progress-bar .progress-track {
    background-color: #444;
    height: 12px;
    border-radius: 10px;
    overflow: hidden;
}

.subscription-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #ffd700);
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

    .subscription-progress-bar .progress-fill::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
        animation: shine 2s infinite;
    }

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.date-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.85em;
    color: #888;
}

.subscription-actions {
    background-color: #2b2b2b;
    border-color: #444;
}

    .subscription-actions .actions-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
    }

    .subscription-actions p {
        margin: 0;
        flex-grow: 1;
    }

.dashboard-notice-inline {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    background: #333;
}


/* --- 4. GLOBAL & SHARED COMPONENT STYLES --- */
.dashboard-card {
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

    .dashboard-card h4 {
        margin-top: 0;
        border-bottom: 1px solid #ffd700;
        padding-bottom: 10px;
        margin-bottom: 20px;
        color: #ffd700;
    }

    .dashboard-card p {
        margin: 0 0 12px;
        line-height: 1.6;
    }

        .dashboard-card p:last-child {
            margin-bottom: 0;
        }

        .dashboard-card p strong {
            color: #ffffff;
            margin-right: 8px;
        }

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

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
        color: #ccc;
    }

    .form-group input[type="text"], .form-group input[type="password"], .form-group input[type="file"] {
        width: 100%;
        padding: 12px;
        background-color: #333;
        border: 1px solid #555;
        border-radius: 5px;
        color: #fff;
        box-sizing: border-box;
        transition: border-color 0.3s, box-shadow 0.3s;
    }

        .form-group input[type="text"]:focus, .form-group input[type="password"]:focus {
            border-color: #ffd700;
            box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
            outline: none;
        }

.dashboard-action {
    background-color: #ffd700;
    color: #1a1a1a;
    border: none;
    padding: 12px 22px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
    display: inline-block;
}

    .dashboard-action:hover {
        background-color: #fff;
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
        transform: translateY(-2px);
    }

    .dashboard-action.destructive {
        background-color: #e74c3c;
        color: #ffffff;
    }

        .dashboard-action.destructive:hover {
            background-color: #c0392b;
            box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
        }

    .dashboard-action:disabled {
        background-color: #555;
        color: #888;
        cursor: not-allowed;
        box-shadow: none;
        transform: none;
    }

#dashboard-notice-container-top {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 320px;
}

.dashboard-notice-top {
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    text-align: center;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInNotice 0.5s forwards;
}

@keyframes slideInNotice {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dashboard-notice-top.success {
    background-color: #27ae60;
}

.dashboard-notice-top.error {
    background-color: #e74c3c;
}

.dashboard-notice-top.loading {
    background-color: #3498db;
}

.danger-zone {
    border: 1px solid #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

.danger-zone-title {
    color: #e74c3c;
    border-bottom-color: #e74c3c;
}

/* --- 5. RESPONSIVE STYLES --- */
@media (max-width: 900px) {
    #company-dashboard-v2 {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 0;
        border-bottom: 1px solid #444;
    }

    .sidebar-profile {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        width: 100%;
        justify-content: space-around;
    }

        .sidebar-nav li a {
            padding: 15px 10px;
            border-left: none;
            border-bottom: 3px solid transparent;
        }

            .sidebar-nav li a.active {
                border-bottom-color: #ffd700;
                background: transparent;
            }

    .dashboard-content {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .sidebar-nav li a i {
        margin-right: 0;
    }

    .sidebar-nav li a span {
        display: none;
    }

    .dashboard-content {
        padding: 20px 15px;
    }

    .subscription-status-card .plan-name {
        font-size: 1.4em;
    }

    .subscription-status-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .subscription-actions .actions-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .subscription-actions .dashboard-action {
        width: 100%;
        text-align: center;
    }
}
