/* FILE: components.css */

/* --- BUTTONS --- */
.cta-button {
    display: inline-block;
    background: var(--secondary-color);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 15px 35px;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.cta-button:hover {
    background: #008a68;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cta-button.secondary-action {
    background: #34495e; 
}
.cta-button.secondary-action:hover {
    background: #2c3e50;
}

.submit-button {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: background 0.3s ease;
}
.submit-button:hover {
    background: #004482;
}

/* --- DASHBOARD GRID --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.dashboard-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.dashboard-card:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.dashboard-card--admin {
    background: #FFE8E3; 
    color: #B12704;
}
.dashboard-card--admin:hover {
    background: #FFDCD4;
    border-color: #B12704;
}

.dashboard-card-highlight {
    background-color: #e6ffed;
    color: #004d00;
    border-color: #b8ffc9;
}
.dashboard-card-highlight:hover {
    background-color: #d4edda;
}

/* --- GENERAL TABLE STYLES --- */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.9em;
    min-width: 400px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.styled-table thead tr {
    background-color: var(--primary-color);
    color: #ffffff;
    text-align: left;
}

.styled-table th,
.styled-table td {
    padding: 12px 15px;
    border: 1px solid #eee;
}

.styled-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
    border-bottom: 2px solid var(--primary-color);
}


/* --- LOGIN/REGISTER FORMS --- */
.login-form-wrapper,
.register-form-wrapper {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 15px;
}

.form-label {
    width: 35%;
    font-weight: 600;
    text-align: right;
    font-size: 0.95rem;
}

.register-form-wrapper input[type="text"],
.register-form-wrapper input[type="email"],
.register-form-wrapper input[type="password"],
.login-form-wrapper input[type="text"],
.login-form-wrapper input[type="email"],
.login-form-wrapper input[type="password"] {
    width: 65%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
}

.form-actions-single {
    display: flex;
    justify-content: flex-end;
    margin-top: 25px;
}

.form-message-top {
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: center;
}

.form-message-register {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    margin-bottom: 15px;
}
.form-message-register a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-nav {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.auth-nav a {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- PRODUCT & CATEGORY LISTS --- */
.product-list-item {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    text-align: left;
    margin-top: 15px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.product-list-item:hover {
    border-color: #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
}

.product-list-image {
    flex-shrink: 0;
}

.product-list-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 1px solid #ccc;
    padding: 1px;
    border-radius: 4px;
    vertical-align: top;
}

.product-list-info {
    flex-grow: 1;
    flex-basis: 300px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-list-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-color, #005fB1);
    text-decoration: none;
    line-height: 1.3;
}

.product-list-title a {
    color: inherit;
    text-decoration: none;
}
.product-list-title a:hover {
    text-decoration: underline;
}

.product-list-price {
    font-size: 1.1rem;
    font-weight: 700;
}
.product-list-price .reg-price {
    text-decoration: line-through;
    color: #B12704;
    font-weight: 400;
    font-size: 0.9rem;
    margin-right: 5px;
}
.product-list-price .sale-price {
    color: var(--secondary-color);
}

.product-list-meta {
    font-size: 0.85rem;
    color: #666;
    
}

.product-list-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}


/* --- BREADCRUMB NAVIGATION --- */
.breadcrumb-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 3px solid var(--secondary-color);
    margin-bottom: 20px;
}

.breadcrumb-nav {
    font-size: 14px;
    font-weight: 500;
}

.breadcrumb-nav a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav span.breadcrumb-separator {
    display: inline-block;
    padding: 0 0.5rem;
    color: #6c757d;
    font-weight: 400;
}

.breadcrumb-nav a.active {
    color: var(--dark-text);
    font-weight: 600;
}

@media (max-width: 768px) {
    .breadcrumb-nav { font-size: 12px; }
    .breadcrumb-nav span.breadcrumb-separator { padding: 0 0.25rem; }
    .breadcrumb-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .register-form-wrapper .form-row,
    .login-form-wrapper .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .register-form-wrapper .form-label,
    .login-form-wrapper .form-label,
    .register-form-wrapper input[type="text"],
    .register-form-wrapper input[type="email"],
    .register-form-wrapper input[type="password"],
    .login-form-wrapper input[type="text"],
    .login-form-wrapper input[type="email"],
    .login-form-wrapper input[type="password"] {
        width: 100%;
        text-align: left;
    }
}

/* --- ADMIN APP-LIKE STYLES --- */
.data-list-container { display: flex; flex-direction: column; gap: 15px; }

.data-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}
.data-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.data-col { flex: 1; min-width: 150px; }

.data-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
    margin-bottom: 4px;
}
.data-value {
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
    word-break: break-word;
}

.status-badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; }
.status-paid { background: #e6ffed; color: #007600; border: 1px solid #b8ffc9; }
.status-unpaid { background: #ffebe6; color: #B12704; border: 1px solid #ffc5b8; }
.status-shipped { background: #e3f2fd; color: #0d47a1; border: 1px solid #bbdefb; }
.status-neutral { background: #f0f0f0; color: #555; border: 1px solid #ccc; }

.action-btn-group { display: flex; gap: 10px; justify-content: flex-end; flex: 0 0 auto; }

.app-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: #f0f4f8;
    color: #555;
    border: 1px solid #d1d9e6;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    cursor: pointer;
}
.app-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.app-btn-primary { background: var(--primary-color); color: #fff; border: none; }

.app-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.app-form-group { margin-bottom: 0; }
.app-form-label { display: block; font-size: 0.8rem; font-weight: 700; color: #555; margin-bottom: 5px; }
.app-form-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fafafa;
}
.app-form-input:focus { background: #fff; border-color: var(--primary-color); outline: none; }

/* --- USER DASHBOARD LAUNCHPAD STYLES --- */

/* Sidebar Menu Links */
.app-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.app-menu-link:hover {
    background: #f0f4f8;
    color: var(--primary-color);
    transform: translateX(4px);
    border-color: #e0e0e0;
}
.app-menu-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.app-menu-link:hover svg { opacity: 1; }

.app-menu-link.admin-link {
    background: #fff5f5;
    color: #B12704;
    border-color: #ffdcd4;
}
.app-menu-link.admin-link:hover {
    background: #B12704;
    color: #fff;
}

/* Main Dashboard Launchpad (Grid) */
.launchpad-grid {
    display: grid;
    /* Tighter grid for desktop */
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 12px; 
    margin-top: 10px;
}

.launchpad-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px; /* Reduced radius */
    padding: 15px 10px; /* Reduced padding */
    text-decoration: none;
    color: #444;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    height: 100%;
    border: 1px solid #e0e0e0;
    font-size: 0.85rem; /* Smaller font */
}

.launchpad-tile strong {
    display: block;
    line-height: 1.2;
}

.launchpad-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.launchpad-icon {
    margin-bottom: 8px; /* Reduced margin */
    color: var(--primary-color);
    opacity: 0.9;
}
.launchpad-icon svg {
    width: 28px; /* Smaller icon */
    height: 28px;
}

.launchpad-tile:hover .launchpad-icon {
    transform: scale(1.05);
    opacity: 1;
}

.launchpad-tile.tile-admin { border-color: #ffc5b8; color: #B12704; }
.launchpad-tile.tile-admin .launchpad-icon { color: #B12704; }
.launchpad-tile.tile-admin:hover { background-color: #fff5f5; border-color: #B12704; }

.launchpad-tile.tile-support .launchpad-icon { color: #00A67E; }

/* Mobile Adjustments */
@media (max-width: 768px) {
    .data-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .data-col {
        width: 100%;
        min-width: 0;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 8px;
    }
    .data-col:last-child { border-bottom: none; padding-bottom: 0; }
    .action-btn-group {
        width: 100%;
        justify-content: space-between;
        margin-top: 5px;
    }
    .app-btn {
        flex: 1;
        justify-content: center;
        padding: 10px;
    }
    .app-form-grid { grid-template-columns: 1fr; }
    
    /* FORCE 2 COLUMNS ON MOBILE FOR LAUNCHPAD */
    .launchpad-grid {
        grid-template-columns: 1fr 1fr;
    }
}