:root {
    --primary: #1e272e;
    --accent: #3498db;
    --danger: #e74c3c;
    --bg: #ecf0f1;
    --card-bg: #ffffff;
    --radius-btn: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.12'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-container,
.launchpad-container {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
}

.launchpad-container {
    max-width: 900px;
}

.system-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary);
}

.subtitle {
    font-size: 16px;
    color: #8395a7;
    margin-bottom: 30px;
    line-height: 1.6;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

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

.input-field {
    width: 100%;
    padding: 15px 20px;
    border-radius: var(--radius-btn);
    border: 2px solid #dfe6e9;
    background: #fdfdfd;
    font-size: 20px;
    transition: all 0.3s ease;
    outline: none;
    letter-spacing: 5px;
    text-align: center;
    font-weight: bold;
    color: var(--primary);
}

.input-field:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.1);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent) 0%, #2980b9 100%);
    color: white;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-submit:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.45);
}

.error-alert {
    background: #ffdddd;
    color: var(--danger);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid var(--danger);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.app-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 25px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

.app-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(52, 152, 219, 0.15);
    border-color: var(--accent);
    background: #fff;
}

.app-icon {
    font-size: 45px;
    margin-bottom: 15px;
}

.app-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 5px;
}

.app-desc {
    font-size: 14px;
    color: #8395a7;
    text-align: center;
}

.btn-top-logout {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 13px;
    text-decoration: none;
    color: var(--danger);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 20px;
    background: #ffeded;
    transition: all 0.3s ease;
}
.btn-top-logout:hover {
    background: var(--danger);
    color: #fff;
}

/* ==================================
   GLOBAL TOAST NOTIFICATIONS
================================== */
#molon-toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none; /* Allows clicking through the container itself */
}

.molon-toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    padding: 16px;
    width: 320px;
    max-width: 90vw;
    pointer-events: auto; /* Re-enable pointer events for the toast itself */
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    border-left: 4px solid #3498db; /* Default left border color */
}

.molon-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.molon-toast .toast-icon {
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    padding-top: 2px;
}

.molon-toast .toast-message {
    flex-grow: 1;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.molon-toast .toast-close {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 0 0 10px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.molon-toast .toast-close:hover {
    color: #34495e;
}

/* Dark mode overrides for Toasts */
body.dark-mode .molon-toast {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body.dark-mode .molon-toast .toast-message {
    color: #f8fafc;
}

body.dark-mode .molon-toast .toast-close:hover {
    color: #fff;
}
